Add HighligthMacroSettingsButton()

This commit is contained in:
WarmUpTill 2024-06-02 16:47:40 +02:00 committed by WarmUpTill
parent 37c32dd1ed
commit ee68427036
2 changed files with 32 additions and 0 deletions

View File

@ -750,6 +750,36 @@ QWidget *GetSettingsWindow()
return SettingsWindowIsOpened() ? AdvSceneSwitcher::window : nullptr;
}
void AdvSceneSwitcher::HighligthMacroSettingsButton(bool enable)
{
static QObject *highlight = nullptr;
if ((highlight && enable) || (!highlight && !enable)) {
return;
}
if (highlight && !enable) {
highlight->deleteLater();
highlight = nullptr;
return;
}
if (!HighlightUIElementsEnabled()) {
return;
}
highlight = HighlightWidget(ui->macroProperties, Qt::green);
}
void HighligthMacroSettingsButton(bool enable)
{
auto window = GetSettingsWindow();
if (!window) {
return;
}
static_cast<AdvSceneSwitcher *>(window)->HighligthMacroSettingsButton(
enable);
}
void SetupActionQueues();
extern "C" EXPORT void InitSceneSwitcher(obs_module_t *module,

View File

@ -96,6 +96,7 @@ public:
void SetConditionData(Macro &m);
void SwapActions(Macro *m, int pos1, int pos2);
void SwapConditions(Macro *m, int pos1, int pos2);
void HighligthMacroSettingsButton(bool enable = true);
public slots:
void on_macroAdd_clicked();
@ -410,5 +411,6 @@ public slots:
void OpenSettingsWindow();
QWidget *GetSettingsWindow();
void HighligthMacroSettingsButton(bool enable);
} // namespace advss