mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-27 03:36:00 -05:00
Move loading / saving of global macro properties
This commit is contained in:
@@ -512,6 +512,7 @@ void SwitcherData::LoadSettings(obs_data_t *obj)
|
||||
}
|
||||
|
||||
LoadMacros(obj);
|
||||
LoadGlobalMacroProperties(obj);
|
||||
loadWindowTitleSwitches(obj);
|
||||
loadScreenRegionSwitches(obj);
|
||||
loadPauseSwitches(obj);
|
||||
@@ -548,6 +549,7 @@ void SwitcherData::SaveSettings(obs_data_t *obj)
|
||||
|
||||
saveSceneGroups(obj);
|
||||
SaveMacros(obj);
|
||||
SaveGlobalMacroProperties(obj);
|
||||
SaveVariables(obj);
|
||||
saveWindowTitleSwitches(obj);
|
||||
saveScreenRegionSwitches(obj);
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
namespace advss {
|
||||
|
||||
static MacroProperties macroProperties;
|
||||
|
||||
void MacroProperties::Save(obs_data_t *obj) const
|
||||
{
|
||||
auto data = obs_data_create();
|
||||
@@ -325,4 +327,19 @@ bool MacroPropertiesDialog::AskForSettings(QWidget *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
MacroProperties &GetGlobalMacroProperties()
|
||||
{
|
||||
return macroProperties;
|
||||
}
|
||||
|
||||
void SaveGlobalMacroProperties(obs_data_t *obj)
|
||||
{
|
||||
macroProperties.Save(obj);
|
||||
}
|
||||
|
||||
void LoadGlobalMacroProperties(obs_data_t *obj)
|
||||
{
|
||||
macroProperties.Load(obj);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
||||
@@ -68,4 +68,8 @@ private:
|
||||
int _conditionsFalseTextRow = -1;
|
||||
};
|
||||
|
||||
MacroProperties &GetGlobalMacroProperties();
|
||||
void SaveGlobalMacroProperties(obs_data_t *obj);
|
||||
void LoadGlobalMacroProperties(obs_data_t *obj);
|
||||
|
||||
} // namespace advss
|
||||
|
||||
Reference in New Issue
Block a user