Show variable mapping for "Source" and "Twitch" action
Some checks failed
debian-build / build (push) Has been cancelled
Check locale / ubuntu64 (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled

This commit is contained in:
WarmUpTill 2026-04-25 15:28:27 +02:00 committed by WarmUpTill
parent dec5c2d763
commit 713f695aa4
4 changed files with 14 additions and 1 deletions

View File

@ -794,6 +794,8 @@ void MacroActionSourceEdit::SetWidgetVisibility()
action == MacroActionSource::Action::CLOSE_FILTER_DIALOG ||
action == MacroActionSource::Action::CLOSE_PROPERTIES_DIALOG);
emit ShowVariableMappings(isGetSetting || isGetSettings);
adjustSize();
updateGeometry();
}

View File

@ -113,6 +113,7 @@ private slots:
signals:
void HeaderInfoChanged(const QString &);
void ShowVariableMappings(bool show);
private:
void SetWidgetVisibility();

View File

@ -1840,7 +1840,10 @@ void MacroActionTwitchEdit::SetWidgetLayout()
const char *layoutText;
const char *layout2Text = nullptr;
switch (_entryData->GetAction()) {
const auto action = _entryData->GetAction();
switch (action) {
case MacroActionTwitch::Action::SEND_CHAT_MESSAGE:
layoutText = obs_module_text(
"AdvSceneSwitcher.action.twitch.layout.chat");
@ -1892,6 +1895,12 @@ void MacroActionTwitchEdit::SetWidgetLayout()
_layout->setContentsMargins(0, 0, 0, 0);
_layout2->setContentsMargins(0, 0, 0, 0);
const bool showVariableMapping =
action == MacroActionTwitch::Action::CHANNEL_GET_INFO ||
action == MacroActionTwitch::Action::USER_GET_INFO ||
action == MacroActionTwitch::Action::POINTS_REWARD_GET_INFO;
emit ShowVariableMappings(showVariableMapping);
}
void MacroActionTwitchEdit::UpdateEntryData()

View File

@ -267,6 +267,7 @@ private slots:
signals:
void HeaderInfoChanged(const QString &);
void ShowVariableMappings(bool show);
protected:
std::shared_ptr<MacroActionTwitch> _entryData;