diff --git a/build/data/obs-studio/locale/en.txt b/build/data/obs-studio/locale/en.txt index 0cd55d45d..decf1911d 100644 --- a/build/data/obs-studio/locale/en.txt +++ b/build/data/obs-studio/locale/en.txt @@ -139,6 +139,11 @@ Basic.MainMenu.Edit.Transform.FlipVertical="Flip &Vertical" Basic.MainMenu.Edit.Transform.FitToScreen="&Fit to screen" Basic.MainMenu.Edit.Transform.StretchToScreen="&Stretch to screen" Basic.MainMenu.Edit.Transform.CenterToScreen="&Center to screen" +Basic.MainMenu.Edit.Order="&Order" +Basic.MainMenu.Edit.Order.MoveUp="Move &Up" +Basic.MainMenu.Edit.Order.MoveDown="Move &Down" +Basic.MainMenu.Edit.Order.MoveToTop="Move to &Top" +Basic.MainMenu.Edit.Order.MoveToBottom="Move to &Bottom" # basic mode help menu Basic.MainMenu.Help="&Help" diff --git a/obs/forms/OBSBasic.ui b/obs/forms/OBSBasic.ui index fbda14f7b..3ba575e53 100644 --- a/obs/forms/OBSBasic.ui +++ b/obs/forms/OBSBasic.ui @@ -491,10 +491,21 @@ + + + Basic.MainMenu.Edit.Order + + + + + + + + @@ -725,6 +736,38 @@ Basic.MainMenu.Edit.Transform.FlipVertical + + + Basic.MainMenu.Edit.Order.MoveUp + + + Ctrl+Up + + + + + Basic.MainMenu.Edit.Order.MoveDown + + + Ctrl+Down + + + + + Basic.MainMenu.Edit.Order.MoveToTop + + + Ctrl+Home + + + + + Basic.MainMenu.Edit.Order.MoveToBottom + + + Ctrl+End + + diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 5b3821edf..1d10183a2 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -1383,6 +1383,8 @@ void OBSBasic::on_sources_customContextMenuRequested(const QPoint &pos) popup.addAction(QTStr("Remove"), this, SLOT(on_actionRemoveSource_triggered()), QKeySequence::Delete); + popup.addSeparator(); + popup.addMenu(ui->orderMenu); popup.addMenu(ui->transformMenu); popup.addSeparator(); popup.addAction(QTStr("Properties"), this, @@ -1493,6 +1495,30 @@ void OBSBasic::on_actionSourceDown_triggered() obs_sceneitem_setorder(item, ORDER_MOVE_DOWN); } +void OBSBasic::on_actionMoveUp_triggered() +{ + OBSSceneItem item = GetCurrentSceneItem(); + obs_sceneitem_setorder(item, ORDER_MOVE_UP); +} + +void OBSBasic::on_actionMoveDown_triggered() +{ + OBSSceneItem item = GetCurrentSceneItem(); + obs_sceneitem_setorder(item, ORDER_MOVE_DOWN); +} + +void OBSBasic::on_actionMoveToTop_triggered() +{ + OBSSceneItem item = GetCurrentSceneItem(); + obs_sceneitem_setorder(item, ORDER_MOVE_TOP); +} + +void OBSBasic::on_actionMoveToBottom_triggered() +{ + OBSSceneItem item = GetCurrentSceneItem(); + obs_sceneitem_setorder(item, ORDER_MOVE_BOTTOM); +} + static char *ReadLogFile(const char *log) { BPtr logDir(os_get_config_path("obs-studio/logs")); diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 7a92b9c7f..e992f1891 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -241,6 +241,11 @@ private slots: void on_actionSourceUp_triggered(); void on_actionSourceDown_triggered(); + void on_actionMoveUp_triggered(); + void on_actionMoveDown_triggered(); + void on_actionMoveToTop_triggered(); + void on_actionMoveToBottom_triggered(); + void on_streamButton_clicked(); void on_recordButton_clicked(); void on_settingsButton_clicked();