Add option to enable / disable / toggle macro highlighting

This commit is contained in:
WarmUpTill
2025-08-18 19:05:31 +02:00
committed by WarmUpTill
parent 756d7bbd3c
commit d20a975c4f
5 changed files with 116 additions and 57 deletions

View File

@@ -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