Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
4649783b
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,发现更多精彩内容 >>
提交
4649783b
编写于
3月 16, 2018
作者:
S
Shaolin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add option to toggle multiview scene names
上级
e0e2cc57
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
18 deletion
+50
-18
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+1
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+11
-1
UI/obs-app.cpp
UI/obs-app.cpp
+3
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+10
-0
UI/window-projector.cpp
UI/window-projector.cpp
+25
-17
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
4649783b
...
@@ -573,6 +573,7 @@ Basic.Settings.General.SwitchOnDoubleClick="Transition to scene when double-clic
...
@@ -573,6 +573,7 @@ Basic.Settings.General.SwitchOnDoubleClick="Transition to scene when double-clic
Basic.Settings.General.StudioPortraitLayout
=
"Enable portrait/vertical layout"
Basic.Settings.General.StudioPortraitLayout
=
"Enable portrait/vertical layout"
Basic.Settings.General.Multiview
=
"Multiview"
Basic.Settings.General.Multiview
=
"Multiview"
Basic.Settings.General.Multiview.MouseSwitch
=
"Click to switch between scenes"
Basic.Settings.General.Multiview.MouseSwitch
=
"Click to switch between scenes"
Basic.Settings.General.Multiview.DrawSourceNames
=
"Show scene names"
Basic.Settings.General.MultiviewLayout
=
"Multiview Layout"
Basic.Settings.General.MultiviewLayout
=
"Multiview Layout"
Basic.Settings.General.MultiviewLayout.Horizontal.Top
=
"Horizontal, Top (8 Scenes)"
Basic.Settings.General.MultiviewLayout.Horizontal.Top
=
"Horizontal, Top (8 Scenes)"
Basic.Settings.General.MultiviewLayout.Horizontal.Bottom
=
"Horizontal, Bottom (8 Scenes)"
Basic.Settings.General.MultiviewLayout.Horizontal.Bottom
=
"Horizontal, Bottom (8 Scenes)"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
4649783b
...
@@ -627,9 +627,19 @@
...
@@ -627,9 +627,19 @@
</widget>
</widget>
</item>
</item>
<item
row=
"1"
column=
"1"
>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"multiviewDrawNames"
>
<property
name=
"text"
>
<string>
Basic.Settings.General.Multiview.DrawSourceNames
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"multiviewLayout"
/>
<widget
class=
"QComboBox"
name=
"multiviewLayout"
/>
</item>
</item>
<item
row=
"
1
"
column=
"0"
>
<item
row=
"
2
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_64"
>
<widget
class=
"QLabel"
name=
"label_64"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Basic.Settings.General.MultiviewLayout
</string>
<string>
Basic.Settings.General.MultiviewLayout
</string>
...
...
UI/obs-app.cpp
浏览文件 @
4649783b
...
@@ -424,6 +424,9 @@ bool OBSApp::InitGlobalConfigDefaults()
...
@@ -424,6 +424,9 @@ bool OBSApp::InitGlobalConfigDefaults()
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"MultiviewMouseSwitch"
,
true
);
"MultiviewMouseSwitch"
,
true
);
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"MultiviewDrawNames"
,
true
);
#ifdef _WIN32
#ifdef _WIN32
config_set_default_bool
(
globalConfig
,
"Audio"
,
"DisableAudioDucking"
,
config_set_default_bool
(
globalConfig
,
"Audio"
,
"DisableAudioDucking"
,
true
);
true
);
...
...
UI/window-basic-settings.cpp
浏览文件 @
4649783b
...
@@ -319,6 +319,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
...
@@ -319,6 +319,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
doubleClickSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
doubleClickSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
studioPortraitLayout
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
studioPortraitLayout
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewMouseSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewMouseSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewDrawNames
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewLayout
,
COMBO_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewLayout
,
COMBO_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
outputMode
,
COMBO_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
outputMode
,
COMBO_CHANGED
,
OUTPUTS_CHANGED
);
HookWidget
(
ui
->
streamType
,
COMBO_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
streamType
,
COMBO_CHANGED
,
STREAM1_CHANGED
);
...
@@ -1105,6 +1106,10 @@ void OBSBasicSettings::LoadGeneralSettings()
...
@@ -1105,6 +1106,10 @@ void OBSBasicSettings::LoadGeneralSettings()
"BasicWindow"
,
"MultiviewMouseSwitch"
);
"BasicWindow"
,
"MultiviewMouseSwitch"
);
ui
->
multiviewMouseSwitch
->
setChecked
(
multiviewMouseSwitch
);
ui
->
multiviewMouseSwitch
->
setChecked
(
multiviewMouseSwitch
);
bool
multiviewDrawNames
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"MultiviewDrawNames"
);
ui
->
multiviewDrawNames
->
setChecked
(
multiviewDrawNames
);
ui
->
multiviewLayout
->
addItem
(
QTStr
(
ui
->
multiviewLayout
->
addItem
(
QTStr
(
"Basic.Settings.General.MultiviewLayout.Horizontal.Top"
),
"Basic.Settings.General.MultiviewLayout.Horizontal.Top"
),
static_cast
<
int
>
(
MultiviewLayout
::
HORIZONTAL_TOP_8_SCENES
));
static_cast
<
int
>
(
MultiviewLayout
::
HORIZONTAL_TOP_8_SCENES
));
...
@@ -2714,6 +2719,11 @@ void OBSBasicSettings::SaveGeneralSettings()
...
@@ -2714,6 +2719,11 @@ void OBSBasicSettings::SaveGeneralSettings()
"MultiviewMouseSwitch"
,
"MultiviewMouseSwitch"
,
ui
->
multiviewMouseSwitch
->
isChecked
());
ui
->
multiviewMouseSwitch
->
isChecked
());
if
(
WidgetChanged
(
ui
->
multiviewDrawNames
))
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"MultiviewDrawNames"
,
ui
->
multiviewDrawNames
->
isChecked
());
if
(
WidgetChanged
(
ui
->
multiviewLayout
))
{
if
(
WidgetChanged
(
ui
->
multiviewLayout
))
{
config_set_int
(
GetGlobalConfig
(),
"BasicWindow"
,
config_set_int
(
GetGlobalConfig
(),
"BasicWindow"
,
"MultiviewLayout"
,
"MultiviewLayout"
,
...
...
UI/window-projector.cpp
浏览文件 @
4649783b
...
@@ -494,7 +494,8 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
...
@@ -494,7 +494,8 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
/* ----------- */
/* ----------- */
// Render the label
// Render the label
if
(
!
label
)
if
(
!
label
||
!
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"MultiviewDrawNames"
))
continue
;
continue
;
offset
=
labelOffset
(
label
,
quarterCX
);
offset
=
labelOffset
(
label
,
quarterCX
);
...
@@ -548,14 +549,17 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
...
@@ -548,14 +549,17 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
/* ----------- */
/* ----------- */
// Draw the Label
// Draw the Label
gs_matrix_push
();
if
(
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
gs_matrix_translate3f
(
labelX
,
labelY
,
0.0
f
);
"MultiviewDrawNames"
))
{
gs_matrix_scale3f
(
hiScaleX
,
hiScaleY
,
1.0
f
);
gs_matrix_push
();
drawBox
(
obs_source_get_width
(
previewLabel
),
gs_matrix_translate3f
(
labelX
,
labelY
,
0.0
f
);
obs_source_get_height
(
previewLabel
)
+
gs_matrix_scale3f
(
hiScaleX
,
hiScaleY
,
1.0
f
);
int
(
halfCX
*
0.015
f
),
labelColor
);
drawBox
(
obs_source_get_width
(
previewLabel
),
obs_source_video_render
(
previewLabel
);
obs_source_get_height
(
previewLabel
)
+
gs_matrix_pop
();
int
(
halfCX
*
0.015
f
),
labelColor
);
obs_source_video_render
(
previewLabel
);
gs_matrix_pop
();
}
/* ----------------------------- */
/* ----------------------------- */
/* draw program */
/* draw program */
...
@@ -576,14 +580,18 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
...
@@ -576,14 +580,18 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
/* ----------- */
/* ----------- */
// Draw the Label
// Draw the Label
gs_matrix_push
();
if
(
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
gs_matrix_translate3f
(
labelX
,
labelY
,
0.0
f
);
"MultiviewDrawNames"
))
{
gs_matrix_scale3f
(
hiScaleX
,
hiScaleY
,
1.0
f
);
gs_matrix_push
();
drawBox
(
obs_source_get_width
(
programLabel
),
gs_matrix_translate3f
(
labelX
,
labelY
,
0.0
f
);
obs_source_get_height
(
programLabel
)
+
gs_matrix_scale3f
(
hiScaleX
,
hiScaleY
,
1.0
f
);
int
(
halfCX
*
0.015
f
),
labelColor
);
drawBox
(
obs_source_get_width
(
programLabel
),
obs_source_video_render
(
programLabel
);
obs_source_get_height
(
programLabel
)
+
gs_matrix_pop
();
int
(
halfCX
*
0.015
f
),
labelColor
);
obs_source_video_render
(
programLabel
);
gs_matrix_pop
();
}
endRegion
();
endRegion
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录