11 protected static string DIALOG_TAG_SAVE_SUCCESS =
"save_successful";
12 protected static string DIALOG_TAG_SAVE_FAIL =
"save_failed";
13 protected static string DIALOG_TAG_SAVE_OVERRIDE =
"save_override";
14 protected static string DIALOG_TAG_NO_CONNECTION =
"no_connection";
16 protected static string JSON_POSTFIX =
".json";
18 protected static string DIALOG_OVERRIDE =
"#AR-ServerHosting_OverrideWarning";
19 protected static string DIALOG_SAVED =
"#AR-ServerHosting_SaveSuccessful";
21 protected const string COLOR_TAG =
"<color rgba='%1'>";
44 super.OnMenuOpen(preset);
71 if (m_TemporaryConfig)
76 m_TemporaryConfig =
null;
91 Print(
"Missing config references");
110 if (m_SuperMenuComponent.GetTabView().m_iSelectedTab != invalidTab)
111 m_SuperMenuComponent.GetTabView().ShowTab(invalidTab);
114 GetGame().GetWorkspace().SetFocusedWidget(invalidEntry);
121 array<ref SCR_WidgetListEntry> properties =
m_ConfigList.GetInitialEntryList();
123 for (
int i = 0, count = advanced.Count(); i < count; i++)
125 properties.Insert(advanced[i]);
128 array<ref DSMod> mods =
m_ConfigMods.SelectedModsList();
129 WorkshopItem scenarioMod =
m_ConfigList.GetScenarioOwnerMod();
131 m_DSConfig.StoreFullJson(properties, mods, scenarioMod);
163 protected ref MissionWorkshopItem hostedScenario =
m_ConfigList.GetSelectedScenario();
168 GameSessionStorage.s_Data[
"m_iRejoinAttempt"] =
"0";
171 MenuBase lastMenu =
GetGame().GetMenuManager().GetTopMenu();
201 saveDialog.SetFileNameText(name);
211 array<string> configs = {};
212 GetGame().GetBackendApi().GetAvailableConfigs(configs);
216 for (
int i = 0, count = configs.Count(); i < count; i++)
218 if (name + JSON_POSTFIX == configs[i])
224 string msg = WidgetManager.Translate(DIALOG_OVERRIDE, name, color,
COLOR_TAG_END);
225 overrideDialog.SetMessage(msg);
247 array<string> paths = {};
248 GetGame().GetBackendApi().GetAvailableConfigPaths(paths);
251 array<string> configs = {};
252 GetGame().GetBackendApi().GetAvailableConfigs(configs);
255 for (
int i = 0, count = configs.Count(); i < count; i++)
257 if (name + JSON_POSTFIX == configs[i])
260 string msg = WidgetManager.Translate(DIALOG_SAVED, paths[i], color,
COLOR_TAG_END);
263 dialog.SetMessage(msg);
291 array<ref SCR_WidgetListEntry> properties =
m_ConfigList.GetInitialEntryList();
293 for (
int i = 0, count = advanced.Count(); i < count; i++)
294 properties.Insert(advanced[i]);
296 array<ref DSMod> mods =
m_ConfigMods.SelectedModsList();
297 WorkshopItem scenarioMod =
m_ConfigList.GetScenarioOwnerMod();
299 m_DSConfig.StoreFullJson(properties, mods, scenarioMod);
305 ContentBrowserUI workshopUI = ContentBrowserUI.Cast(
GetGame().GetMenuManager().GetTopMenu());
336 return m_TemporaryConfig;