mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Implement 'Order' menu
Contains Move Up, Move Down, Move to Top, Move to Bottom. Also assigns Ctrl-Up, Ctrl-Down, Ctrl-Home, Ctrl-End to each action. This was also added to the right-click context menu popup for sources.
This commit is contained in:
@@ -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<char> logDir(os_get_config_path("obs-studio/logs"));
|
||||
|
||||
Reference in New Issue
Block a user