mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add HighligthMacroSettingsButton()
This commit is contained in:
parent
37c32dd1ed
commit
ee68427036
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user