mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Add option to enable / disable / toggle macro highlighting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "plugin-state-helpers.hpp"
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
#include "switcher-data.hpp"
|
||||
|
||||
namespace advss {
|
||||
@@ -231,4 +232,30 @@ bool IsFirstIntervalAfterStop()
|
||||
return GetSwitcher()->firstIntervalAfterStop;
|
||||
}
|
||||
|
||||
void SetMacroHighlightingEnabled(bool enable)
|
||||
{
|
||||
auto &settings = GetGlobalMacroSettings();
|
||||
settings._highlightActions = enable;
|
||||
settings._highlightConditions = enable;
|
||||
settings._highlightExecuted = enable;
|
||||
|
||||
obs_queue_task(
|
||||
OBS_TASK_UI,
|
||||
[](void *) {
|
||||
if (!SettingsWindowIsOpened()) {
|
||||
return;
|
||||
}
|
||||
AdvSceneSwitcher::window->HighlightMacrosChanged(
|
||||
GetGlobalMacroSettings()._highlightExecuted);
|
||||
},
|
||||
nullptr, false);
|
||||
}
|
||||
|
||||
bool IsMacroHighlightingEnabled()
|
||||
{
|
||||
const auto &settings = GetGlobalMacroSettings();
|
||||
return settings._highlightActions || settings._highlightConditions ||
|
||||
settings._highlightExecuted;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
||||
Reference in New Issue
Block a user