mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Add temp variable support to websocket condition
This commit is contained in:
@@ -42,12 +42,14 @@ bool MacroConditionWebsocket::CheckCondition()
|
||||
for (auto &m : *messages) {
|
||||
if (_regex.Enabled()) {
|
||||
if (_regex.Matches(m.message, _message)) {
|
||||
SetTempVarValue("message", m.message);
|
||||
SetVariableValue(m.message);
|
||||
m.processed = true;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (m.message == std::string(_message)) {
|
||||
SetTempVarValue("message", m.message);
|
||||
SetVariableValue(m.message);
|
||||
m.processed = true;
|
||||
return true;
|
||||
@@ -93,6 +95,16 @@ std::string MacroConditionWebsocket::GetShortDesc() const
|
||||
return GetWeakConnectionName(_connection);
|
||||
}
|
||||
|
||||
void MacroConditionWebsocket::SetupTempVars()
|
||||
{
|
||||
MacroCondition::SetupTempVars();
|
||||
AddTempvar(
|
||||
"message",
|
||||
obs_module_text("AdvSceneSwitcher.tempVar.websocket.message"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.websocket.message.description"));
|
||||
}
|
||||
|
||||
static inline void populateConditionSelection(QComboBox *list)
|
||||
{
|
||||
for (auto entry : conditionTypes) {
|
||||
|
||||
Reference in New Issue
Block a user