Add option to perform macro actions only on condition change

This commit is contained in:
WarmUpTill
2022-01-05 22:30:41 +01:00
committed by WarmUpTill
parent d040a01016
commit 16ee789c82
6 changed files with 39 additions and 5 deletions

View File

@@ -120,6 +120,7 @@ public slots:
void on_macroName_editingFinished();
void on_runMacro_clicked();
void on_runMacroInParallel_stateChanged(int value);
void on_runMacroOnChange_stateChanged(int value);
void on_macros_currentRowChanged(int idx);
void on_macros_itemChanged(QListWidgetItem *);
void on_conditionAdd_clicked();

View File

@@ -82,6 +82,8 @@ public:
bool RunInParallel() { return _runInParallel; }
void SetPaused(bool pause = true);
bool Paused() { return _paused; }
void SetMatchOnChange(bool onChange) { _matchOnChange = onChange; }
bool MatchOnChange() { return _matchOnChange; }
int GetCount() { return _count; };
void ResetCount() { _count = 0; };
std::deque<std::shared_ptr<MacroCondition>> &Conditions()
@@ -114,6 +116,8 @@ private:
std::deque<std::shared_ptr<MacroAction>> _actions;
bool _runInParallel = false;
bool _matched = false;
bool _lastMatched = false;
bool _matchOnChange = false;
bool _paused = false;
int _count = 0;
obs_hotkey_id _pauseHotkey = OBS_INVALID_HOTKEY_ID;