Specify scenes to exclude from Region triggers (#111)

Adds an option to exclude a region triggered scene switch if you're
currently in the specified Scene.
This commit is contained in:
Kevin Nash
2021-02-03 13:49:18 -05:00
committed by GitHub
parent 8e8cb4bf3e
commit 1510a2c2fa
7 changed files with 78 additions and 13 deletions

View File

@@ -62,7 +62,8 @@ public:
static void populateSceneSelection(QComboBox *sel,
bool addPrevious = false,
bool addSceneGroup = false,
bool addSelect = true);
bool addSelect = true,
std::string selectText = "");
static void populateTransitionSelection(QComboBox *sel,
bool addSelect = true);

View File

@@ -7,6 +7,7 @@ constexpr auto default_priority_4 = screen_region_func;
struct ScreenRegionSwitch : SceneSwitcherEntry {
static bool pause;
OBSWeakSource excludeScene = nullptr;
int minX = 0, minY = 0, maxX = 0, maxY = 0;
const char *getType() { return "region"; }
@@ -29,12 +30,14 @@ public:
void hideFrame();
private slots:
void ExcludeSceneChanged(const QString &text);
void MinXChanged(int pos);
void MinYChanged(int pos);
void MaxXChanged(int pos);
void MaxYChanged(int pos);
private:
QComboBox *excludeScenes;
QSpinBox *minX;
QSpinBox *minY;
QSpinBox *maxX;