Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
413896a2
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
413896a2
编写于
3月 20, 2020
作者:
J
Jim
提交者:
GitHub
3月 20, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2520 from WizardCM/mixrelixr
UI: Add setting for Mixer add-on choice (MixrElixr)
上级
4563e034
a8b83564
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
73 addition
and
12 deletion
+73
-12
UI/auth-mixer.cpp
UI/auth-mixer.cpp
+15
-0
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+3
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+25
-12
UI/window-basic-settings-stream.cpp
UI/window-basic-settings-stream.cpp
+29
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+1
-0
未找到文件。
UI/auth-mixer.cpp
浏览文件 @
413896a2
...
...
@@ -177,6 +177,11 @@ bool MixerAuth::LoadInternal()
return
OAuthStreamKey
::
LoadInternal
();
}
static
const
char
*
elixr_script
=
"\
var elixr = document.createElement('script');\
elixr.setAttribute('src','https://api.mixrelixr.com/scripts/elixr-emotes-embedded-chat.bundle.js');\
document.head.appendChild(elixr);"
;
void
MixerAuth
::
LoadUI
()
{
if
(
!
cef
)
...
...
@@ -189,6 +194,7 @@ void MixerAuth::LoadUI()
OBSBasic
::
InitBrowserPanelSafeBlock
();
OBSBasic
*
main
=
OBSBasic
::
Get
();
std
::
string
script
=
""
;
std
::
string
url
;
url
+=
"https://mixer.com/embed/chat/"
;
url
+=
id
;
...
...
@@ -206,6 +212,15 @@ void MixerAuth::LoadUI()
QCefWidget
*
browser
=
cef
->
create_widget
(
nullptr
,
url
,
panel_cookies
);
chat
->
SetWidget
(
browser
);
const
int
mxAddonChoice
=
config_get_int
(
main
->
Config
(),
service
(),
"AddonChoice"
);
if
(
mxAddonChoice
)
{
if
(
mxAddonChoice
&
0x1
)
script
+=
elixr_script
;
}
browser
->
setStartupScript
(
script
);
main
->
addDockWidget
(
Qt
::
RightDockWidgetArea
,
chat
.
data
());
chatMenu
.
reset
(
main
->
AddDockWidget
(
chat
.
data
()));
...
...
UI/data/locale/en-US.ini
浏览文件 @
413896a2
...
...
@@ -687,6 +687,9 @@ Basic.Settings.Stream.TTVAddon.None="None"
Basic.Settings.Stream.TTVAddon.BTTV
=
"BetterTTV"
Basic.Settings.Stream.TTVAddon.FFZ
=
"FrankerFaceZ"
Basic.Settings.Stream.TTVAddon.Both
=
"BetterTTV and FrankerFaceZ"
Basic.Settings.Stream.MixerAddon
=
"Mixer Chat Add-Ons"
Basic.Settings.Stream.MixerAddon.None
=
"None"
Basic.Settings.Stream.MixerAddon.MEE
=
"MixrElixr Emotes"
Basic.Settings.Stream.MissingSettingAlert
=
"Missing Stream Setup"
Basic.Settings.Stream.StreamSettingsWarning
=
"Open Settings"
Basic.Settings.Stream.MissingUrlAndApiKey
=
"URL and Stream Key are missing.
\n\n
Open settings to enter the URL and Stream Key in the 'stream' tab."
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
413896a2
...
...
@@ -151,8 +151,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
80
6
</width>
<height>
1
254
</height>
<width>
80
3
</width>
<height>
1
026
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_19"
>
...
...
@@ -1140,7 +1140,7 @@
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"0"
>
<item
row=
"
9
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"authUsernameLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.Custom.Username
</string>
...
...
@@ -1150,10 +1150,10 @@
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"1"
>
<item
row=
"
9
"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"authUsername"
/>
</item>
<item
row=
"
9
"
column=
"0"
>
<item
row=
"
10
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"authPwLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.Custom.Password
</string>
...
...
@@ -1163,7 +1163,7 @@
</property>
</widget>
</item>
<item
row=
"
9
"
column=
"1"
>
<item
row=
"
10
"
column=
"1"
>
<widget
class=
"QWidget"
name=
"authPwWidget"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_25"
>
<property
name=
"leftMargin"
>
...
...
@@ -1208,6 +1208,19 @@
</property>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QLabel"
name=
"mixerAddonLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.MixerAddon
</string>
</property>
<property
name=
"buddy"
>
<cstring>
mixerAddonDropdown
</cstring>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"mixerAddonDropdown"
/>
</item>
</layout>
</widget>
</widget>
...
...
@@ -1244,8 +1257,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
81
3
</width>
<height>
76
1
</height>
<width>
60
3
</width>
<height>
63
1
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_21"
>
...
...
@@ -3753,8 +3766,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
767
</width>
<height>
582
</height>
<width>
555
</width>
<height>
469
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_50"
>
...
...
@@ -4609,8 +4622,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
791
</width>
<height>
970
</height>
<width>
596
</width>
<height>
781
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_23"
>
...
...
UI/window-basic-settings-stream.cpp
浏览文件 @
413896a2
...
...
@@ -41,6 +41,8 @@ void OBSBasicSettings::InitStreamPage()
ui
->
bandwidthTestEnable
->
setVisible
(
false
);
ui
->
twitchAddonDropdown
->
setVisible
(
false
);
ui
->
twitchAddonLabel
->
setVisible
(
false
);
ui
->
mixerAddonDropdown
->
setVisible
(
false
);
ui
->
mixerAddonLabel
->
setVisible
(
false
);
int
vertSpacing
=
ui
->
topStreamLayout
->
verticalSpacing
();
...
...
@@ -67,6 +69,11 @@ void OBSBasicSettings::InitStreamPage()
ui
->
twitchAddonDropdown
->
addItem
(
QTStr
(
"Basic.Settings.Stream.TTVAddon.Both"
));
ui
->
mixerAddonDropdown
->
addItem
(
QTStr
(
"Basic.Settings.Stream.MixerAddon.None"
));
ui
->
mixerAddonDropdown
->
addItem
(
QTStr
(
"Basic.Settings.Stream.MixerAddon.MEE"
));
connect
(
ui
->
service
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
UpdateServerList
()));
connect
(
ui
->
service
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
...
...
@@ -112,6 +119,9 @@ void OBSBasicSettings::LoadStream1Settings()
idx
=
config_get_int
(
main
->
Config
(),
"Twitch"
,
"AddonChoice"
);
ui
->
twitchAddonDropdown
->
setCurrentIndex
(
idx
);
idx
=
config_get_int
(
main
->
Config
(),
"Mixer"
,
"AddonChoice"
);
ui
->
mixerAddonDropdown
->
setCurrentIndex
(
idx
);
}
UpdateServerList
();
...
...
@@ -189,6 +199,19 @@ void OBSBasicSettings::SaveStream1Settings()
if
(
choiceExists
&&
currentChoice
!=
newChoice
)
forceAuthReload
=
true
;
}
if
(
!!
auth
&&
strcmp
(
auth
->
service
(),
"Mixer"
)
==
0
)
{
bool
choiceExists
=
config_has_user_value
(
main
->
Config
(),
"Mixer"
,
"AddonChoice"
);
int
currentChoice
=
config_get_int
(
main
->
Config
(),
"Mixer"
,
"AddonChoice"
);
int
newChoice
=
ui
->
mixerAddonDropdown
->
currentIndex
();
config_set_int
(
main
->
Config
(),
"Mixer"
,
"AddonChoice"
,
newChoice
);
if
(
choiceExists
&&
currentChoice
!=
newChoice
)
forceAuthReload
=
true
;
}
obs_data_set_string
(
settings
,
"key"
,
QT_TO_UTF8
(
ui
->
key
->
text
()));
...
...
@@ -309,6 +332,8 @@ void OBSBasicSettings::on_service_currentIndexChanged(int)
ui
->
bandwidthTestEnable
->
setVisible
(
false
);
ui
->
twitchAddonDropdown
->
setVisible
(
false
);
ui
->
twitchAddonLabel
->
setVisible
(
false
);
ui
->
mixerAddonDropdown
->
setVisible
(
false
);
ui
->
mixerAddonLabel
->
setVisible
(
false
);
#ifdef BROWSER_AVAILABLE
if
(
cef
)
{
...
...
@@ -467,6 +492,10 @@ void OBSBasicSettings::OnOAuthStreamKeyConnected()
ui
->
twitchAddonLabel
->
setVisible
(
true
);
ui
->
twitchAddonDropdown
->
setVisible
(
true
);
}
if
(
strcmp
(
a
->
service
(),
"Mixer"
)
==
0
)
{
ui
->
mixerAddonLabel
->
setVisible
(
true
);
ui
->
mixerAddonDropdown
->
setVisible
(
true
);
}
}
ui
->
streamStackWidget
->
setCurrentIndex
((
int
)
Section
::
StreamKey
);
...
...
UI/window-basic-settings.cpp
浏览文件 @
413896a2
...
...
@@ -371,6 +371,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
key
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
bandwidthTestEnable
,
CHECK_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
twitchAddonDropdown
,
COMBO_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
mixerAddonDropdown
,
COMBO_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
useAuth
,
CHECK_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
authUsername
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
authPw
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录