7 ref MissionWorkshopItem m_Header;
11 void SCR_GMMenuEntry(MissionWorkshopItem h,
bool featured,
bool recent,
bool recommended)
14 m_bIsFeatured = featured;
16 m_bIsRecommended = recommended;
29 protected ResourceName
m_sLayout =
"{02155A85F2DC521F}UI/layouts/Menus/GMMenu/GMMenuTile.layout";
30 protected ResourceName
m_sConfig =
"{CA59D3A983A1BBAB}Configs/GMMenu/GMMenuEntries.conf";
35 protected ref array<ref SCR_GMMenuEntry>
m_aEntries = {};
49 back.m_OnActivated.Insert(
OnBack);
64 super.OnMenuFocusGained();
70 Resource resource = BaseContainerTools.LoadContainer(
m_sConfig);
74 BaseContainer cont = resource.GetResource().ToBaseContainer();
78 array<ResourceName> missions = {};
79 cont.Get(
"m_aGameMasterScenarios", missions);
84 foreach (ResourceName str : missions)
101 protected bool IsUnique(MissionWorkshopItem item, array<ref SCR_GMMenuEntry> entries)
108 if (!entry || !entry.m_Header)
111 if (item == entry.m_Header)
131 entry.SetTile(tile, tile.m_wRoot);
132 tile.m_OnPlay.Insert(
OnPlay);
137 tile.ShowMission(entry.m_Header, entry.m_bIsFeatured, entry.m_bIsRecent, entry.m_bIsRecommended);
152 GetGame().GetSaveManager().ResetFileNameToLoad();
162 if (header && !header.GetSaveFileName().IsEmpty())
163 GetGame().GetSaveManager().SetFileNameToLoad(header);
165 GetGame().GetSaveManager().ResetFileNameToLoad();
184 GetGame().GetSaveManager().ResetFileNameToLoad();
214 MissionWorkshopItem scenario =
GetGame().GetBackendApi().GetWorkshop().GetInGameScenario(
m_CurrentTile.m_Header.GetHeaderResourceName());