Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ContentBrowser_ScenarioSubMenu.c
Go to the documentation of this file.
2 {
3  MODE_ALL, // Show all scenarios
4  MODE_FAVOURITE, // Show only favourite scenarios
5  MODE_RECENT // Show only recently played scenarios
6 }
7 
8 class SCR_ContentBrowser_ScenarioSubMenu : SCR_ContentBrowser_ScenarioSubMenuBase
9 {
10  // This is quite universal and can work in many modes...
11  [Attribute("0", UIWidgets.ComboBox, "Mode in which this submenu must work.", "", ParamEnumArray.FromEnum(EScenarioSubMenuMode))]
12  EScenarioSubMenuMode m_eMode;
13 
14  // Constants
15  protected const int RECENTLY_PLAYED_MAX_ENTRIES = 10; // How many recently played missions to show in the recently played tab
16 
17  // Message tags
18  // Those which end with '2' should be used when no content is found due to filters.
19  protected const string MESSAGE_TAG_NOTHING_FOUND = "nothing_found";
20  protected const string MESSAGE_TAG_NOTHING_FOUND_2 = "nothing_found2";
21  protected const string MESSAGE_TAG_NOTHING_FAVOURITE = "nothing_favourite";
22  protected const string MESSAGE_TAG_NOTHING_FAVOURITE_2 ="nothing_favourite2";
23  protected const string MESSAGE_TAG_NOTHING_RECENT = "nothing_recent";
24  protected const string MESSAGE_TAG_NOTHING_RECENT_2 = "nothing_recent2";
25 
26  // Other
28 
29  protected Widget m_wBeforeSort;
30 
31  protected int m_iEntriesTotal;
32  protected int m_iEntriesCurrent;
33 
34  //------------------------------------------------------------------------------------------------
35  override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout, int index)
36  {
37  super.OnTabCreate(menuRoot, buttonsLayout, index);
38 
39  InitWidgets();
40 
41  m_ScenarioDetailsPanel = m_Widgets.m_ScenarioDetailsPanelComponent;
42 
43  // Try to restore filters
44  m_Widgets.m_FilterPanelComponent.TryLoad();
45 
46  UpdateScenarioList(true);
47  }
48 
49  //------------------------------------------------------------------------------------------------
50  override void OnTabShow()
51  {
52  super.OnTabShow();
53 
54  // Init workshop API
55  // We do it on tab show becasue this tab and others persists when all other tabs are closed,
56  // But we can switch back to it later, and we must setup the workshop api again
58  }
59 
60  //------------------------------------------------------------------------------------------------
61  override void OnTabHide()
62  {
63  super.OnTabHide();
64 
65  // Save configuration of filters
66  m_Widgets.m_FilterPanelComponent.Save();
67  }
68 
69  //------------------------------------------------------------------------------------------------
70  override void OnMenuFocusGained()
71  {
72  //Bring back focus to the last selected line after closing a pop-up dialog, in order to always have an element focused
73  Widget target;
74 
75  if (m_LastSelectedLine)
76  target = m_LastSelectedLine.GetRootWidget();
77  else if (m_Widgets && m_Widgets.m_ScenarioList)
78  target = m_Widgets.m_ScenarioList.GetChildren();
79 
80  if (target)
81  GetGame().GetWorkspace().SetFocusedWidget(target);
82 
83  super.OnMenuFocusGained();
84  }
85 
86  //------------------------------------------------------------------------------------------------
87  override void InitWidgets()
88  {
89  super.InitWidgets();
90 
91  // We provide scenarioSubMenuRoot as root because the widgets of the layours were exported starting from scenarioSubMenuRoot
92  m_Widgets.Init(m_wRoot.FindWidget("scenarioSubMenuRoot"));
93 
94  m_Widgets.m_FilterPanelComponent.GetEditBoxSearch().m_OnConfirm.Insert(OnSearchConfirm);
95  m_Widgets.m_SortingHeaderComponent.m_OnChanged.Insert(OnSortingHeaderChange);
96  }
97 
98  //------------------------------------------------------------------------------------------------
99  override void UpdateNavigationButtons(bool visible = true)
100  {
101  visible = GetSelectedLine() && GetGame().GetInputManager().GetLastUsedInputDevice() != EInputDeviceType.MOUSE;
102  super.UpdateNavigationButtons(visible);
103  }
104 
105  //------------------------------------------------------------------------------------------------
106  override void Play(MissionWorkshopItem scenario)
107  {
108  if (!scenario)
109  return;
110 
111  super.Play(scenario);
112  SCR_MenuLoadingComponent.SaveLastMenu(ChimeraMenuPreset.ScenarioMenu);
113  }
114 
115  //------------------------------------------------------------------------------------------------
116  override void Continue(MissionWorkshopItem scenario)
117  {
118  if (!scenario)
119  return;
120 
121  super.Continue(scenario);
122  SCR_MenuLoadingComponent.SaveLastMenu(ChimeraMenuPreset.ScenarioMenu);
123  }
124 
125  //------------------------------------------------------------------------------------------------
126  override void OnRestartConfirmed()
127  {
128  super.OnRestartConfirmed();
129  SCR_MenuLoadingComponent.SaveLastMenu(ChimeraMenuPreset.ScenarioMenu);
130  }
131 
132  //------------------------------------------------------------------------------------------------
135  {
137  super.OnScenarioStateChanged(comp);
138  }
139 
140  // ---- PROTECTED ----
141  //------------------------------------------------------------------------------------------------
143  protected void UpdateScenarioList(bool setNewFocus)
144  {
145  // Get missions from Workshop API
146  array<MissionWorkshopItem> missionItemsAll = {};
147  m_WorkshopApi.GetPageScenarios(missionItemsAll, 0, 4096); // Get all missions at once
148 
149  // Remove scenarios from disabled addons
150  for (int i = missionItemsAll.Count() - 1; i >= 0; i--)
151  {
152  MissionWorkshopItem m = missionItemsAll[i];
153  WorkshopItem addon = m.GetOwner();
154 
155  if (!addon)
156  continue;
157 
158  SCR_WorkshopItem scriptedItem = SCR_AddonManager.GetInstance().GetItem(addon.Id());
159 
160  if (scriptedItem && scriptedItem.GetAnyDependencyMissing())
161  missionItemsAll.Remove(i);
162  }
163 
164  // Store total number of entries
165  m_iEntriesTotal = missionItemsAll.Count();
166 
167  // Filter items according to current tab mode
168  array<MissionWorkshopItem> missionItemsTabFiltered = {};
169  switch (m_eMode)
170  {
171  // Select only fav. missions
172  case EScenarioSubMenuMode.MODE_FAVOURITE:
173  {
174  foreach (MissionWorkshopItem m : missionItemsAll)
175  {
176  if (m.IsFavorite())
177  missionItemsTabFiltered.Insert(m);
178  }
179 
180  // Bail if there are no favourite missions
181  if (missionItemsTabFiltered.IsEmpty())
182  {
184 
185  m_iEntriesCurrent = 0;
187  return;
188  }
189 
190  break;
191  }
192 
193  // Select only recently played missions
194  case EScenarioSubMenuMode.MODE_RECENT:
195  {
196  // Sort missions by time since last play, select top latest N entries
197  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionTimeSinceLastPlay>.HeapSort(missionItemsAll, false);
198 
199  int i = 0;
200  while (missionItemsTabFiltered.Count() < RECENTLY_PLAYED_MAX_ENTRIES && i < missionItemsAll.Count())
201  {
202  int dt = missionItemsAll[i].GetTimeSinceLastPlay();
203  if (dt != -1)
204  missionItemsTabFiltered.Insert(missionItemsAll[i]);
205  i++;
206  }
207 
208  // Bail if no recent missions
209  if (missionItemsTabFiltered.IsEmpty())
210  {
212 
213  m_iEntriesCurrent = 0;
215  return;
216  }
217 
218  break;
219  }
220 
221  // Select all missions
222  default:
223  {
224  if (missionItemsAll.IsEmpty())
225  {
227 
228  m_iEntriesCurrent = 0;
230  return;
231  }
232 
233  missionItemsTabFiltered = missionItemsAll;
234  break;
235  }
236  }
237 
238  // Filter scenarios based on search string
239  string searchStr = m_Widgets.m_FilterPanelComponent.GetEditBoxSearch().GetValue();
240  array<MissionWorkshopItem> missionItemsSearched = SearchScenarios(missionItemsTabFiltered, searchStr);
241 
242  // Bail if based on search there is no content
243  if (missionItemsSearched.IsEmpty())
244  {
246 
247  // The message depends on current tab
248  string messageTag;
249  switch (m_eMode)
250  {
251  case EScenarioSubMenuMode.MODE_FAVOURITE:
252  messageTag = MESSAGE_TAG_NOTHING_FAVOURITE_2;
253  break;
254 
255  case EScenarioSubMenuMode.MODE_RECENT:
256  messageTag = MESSAGE_TAG_NOTHING_RECENT_2;
257  break;
258 
259  default:
260  messageTag = MESSAGE_TAG_NOTHING_FOUND_2;
261  break;
262  }
263 
264  m_iEntriesCurrent = 0;
265  SetPanelsMode(false, messageTag);
266  return;
267  }
268 
269  // At this point we are sure that there are some missions found
270  // Choose sorting based on selected filter
271  array<MissionWorkshopItem> missionItems = missionItemsSearched;
272  ESortOrder eSortOrder = m_Widgets.m_SortingHeaderComponent.GetSortOrder();
273  string currentSortingItem = m_Widgets.m_SortingHeaderComponent.GetSortElementName();
274 
275  bool sortOrder = false;
276  if (eSortOrder == ESortOrder.DESCENDING)
277  sortOrder = true;
278 
279  // Apply sorting of headers if required
280  if (currentSortingItem.IsEmpty())
281  {
282  currentSortingItem = "name";
283  sortOrder = false;
284  }
285  switch (currentSortingItem)
286  {
287  case "name":
288  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionName>.HeapSort(missionItems, sortOrder);
289  break;
290  case "player_count": // sort by player count
291  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionPlayerCount>.HeapSort(missionItems, sortOrder);
292  break;
293  case "favourite":
294  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionFavourite>.HeapSort(missionItems, sortOrder);
295  break;
296  case "last_played":
297  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionTimeSinceLastPlay>.HeapSort(missionItems, sortOrder);
298  break;
299  case "source":
300  SCR_Sorting<MissionWorkshopItem, SCR_CompareMissionAddonName>.HeapSort(missionItems, sortOrder);
301  break;
302  }
303 
304  m_iEntriesCurrent = missionItemsSearched.Count();
305  SetPanelsMode(false);
306  ScenarioList_CreateMissionEntries(missionItems, setNewFocus);
307  }
308 
309  //------------------------------------------------------------------------------------------------
310  protected static bool SearchStringLocalized(string str, string searchStrLower)
311  {
312  if (str.StartsWith("#"))
313  {
314  // Check translated lowercased string
315  string strTranslated = WidgetManager.Translate(str);
316  if (!strTranslated.IsEmpty())
317  {
318  string strTranslatedLower = strTranslated;
319  strTranslatedLower.ToLower();
320 
321  if (strTranslatedLower.Contains(searchStrLower))
322  return true;
323  }
324  }
325  else
326  {
327  // Check lowercased string
328  string strLower = str;
329  strLower.ToLower();
330 
331  if (strLower.Contains(searchStrLower))
332  return true;
333  }
334 
335  return false;
336  }
337 
338  //------------------------------------------------------------------------------------------------
340  {
341  // Delete previous entries in the list
342  Widget child = m_Widgets.m_ScenarioList.GetChildren();
343  while (child)
344  {
345  Widget nextChild = child.GetSibling();
346  m_Widgets.m_ScenarioList.RemoveChild(child);
347  child = nextChild;
348  }
349  }
350 
351  //------------------------------------------------------------------------------------------------
353  protected void ScenarioList_CreateMissionEntries(array<MissionWorkshopItem> scenarios, bool setNewFocus)
354  {
356 
357  if (!CreateLines(scenarios, m_Widgets.m_ScenarioList))
358  return;
359 
360  // Set focus on first line
361  Widget firstLine = m_Widgets.m_ScenarioList.GetChildren();
362  if (firstLine && setNewFocus)
363  {
364  // If this is called instantly, it doesn't set new focus when menu is first opened.
365  // Probably because menu opening is handled in event handler of main menu's tile.
366  GetGame().GetCallqueue().CallLater(GetGame().GetWorkspace().SetFocusedWidget, 0, false, firstLine, false);
367  }
368 
369  // Reset scroll position
370  m_Widgets.m_ScenarioScroll.SetSliderPos(0, 0, true);
371  }
372  /*
373  //------------------------------------------------------------------------------------------------
374  protected void OnFilterButton()
375  {
376  // Toggle the state of the filter panel
377  bool filterShown = m_Widgets.m_FilterPanelComponent.GetFilterListBoxShown();
378  bool selectedAnyMission = GetSelectedScenario() != null;
379  bool newFilterShown = !filterShown || (filterShown && selectedAnyMission);
380 
381  m_Widgets.m_FilterPanelComponent.ShowFilterListBox(newFilterShown);
382 
383  // Set focus on the button of the filter panel
384  if (newFilterShown)
385  GetGame().GetWorkspace().SetFocusedWidget(m_Widgets.m_FilterPanelComponent.GetWidgets().m_FilterButton);
386  }
387 
388  //------------------------------------------------------------------------------------------------
389  protected void OnSortingButton()
390  {
391  WorkspaceWidget workspace = GetGame().GetWorkspace();
392  Widget focused = workspace.GetFocusedWidget();
393  ScriptedWidgetEventHandler sortComp;
394  if (focused)
395  sortComp = focused.FindHandler(SCR_SortElementComponent);
396 
397 
398  if (sortComp)
399  {
400  // Focused on a sort element
401  // Focus back to previous widget or on first line
402  if (m_wBeforeSort)
403  GetGame().GetWorkspace().SetFocusedWidget(m_wBeforeSort);
404  else
405  {
406  Widget firstLine = m_Widgets.m_ScenarioList.GetChildren();
407  if (firstLine)
408  workspace.SetFocusedWidget(firstLine);
409  }
410  }
411  else
412  {
413  // Not focused on a sort element
414  // Focus on a sort button
415  if (focused.FindHandler(SCR_ContentBrowser_ScenarioLineComponent))
416  m_wBeforeSort = focused; // Return to this widget only if it's a scenario line
417  else
418  m_wBeforeSort = null;
419  m_Widgets.m_SortingHeaderComponent.SetFocus(1);
420  }
421  }
422 
423  //------------------------------------------------------------------------------------------------
424  protected void OnCopyIdButton()
425  {
426  SCR_ContentBrowser_ScenarioLineComponent line = GetSelectedLine();
427 
428  if (!line)
429  return;
430 
431  MissionWorkshopItem scenario = line.GetScenario();
432 
433  if (scenario)
434  System.ExportToClipboard(scenario.Id());
435  }
436  */
437  //------------------------------------------------------------------------------------------------
439  protected void OnSearchConfirm(SCR_EditBoxComponent comp, string newValue)
440  {
441  UpdateScenarioList(false);
442  }
443 
444  //------------------------------------------------------------------------------------------------
447  {
448  UpdateScenarioList(false);
449  }
450  /*
451  //------------------------------------------------------------------------------------------------
453  protected void OnFilterPanelToggled(bool newState)
454  {
455  // When filter panel is disabled, we restore focus back to last focused line
456  if (!newState && GetSelectedLine())
457  {
458  GetGame().GetWorkspace().SetFocusedWidget(GetSelectedLine().GetRootWidget());
459  }
460  }
461  */
462  // ---- PUBLIC ----
463  //------------------------------------------------------------------------------------------------
464  void SetPanelsMode(bool showEmptyPanel, string messagePresetTag = string.Empty)
465  {
466  // Show either main+filter panel or empty panel
467  m_Widgets.m_EmptyPanel.SetVisible(showEmptyPanel);
468  m_Widgets.m_FilterPanel.SetVisible(!showEmptyPanel);
469  m_Widgets.m_LeftPanel.SetVisible(!showEmptyPanel);
470 
471  // Show message or hide it
472  m_Widgets.m_EmptyPanelMessage.SetVisible(!messagePresetTag.IsEmpty());
473  m_Widgets.m_MainPanelMessage.SetVisible(!messagePresetTag.IsEmpty());
474 
475  // Set message based on tag
476  if (!messagePresetTag.IsEmpty())
477  {
478  if (showEmptyPanel)
479  m_Widgets.m_EmptyPanelMessageComponent.SetContentFromPreset(messagePresetTag);
480  else
481  m_Widgets.m_MainPanelMessageComponent.SetContentFromPreset(messagePresetTag);
482  }
483 
484  // Items Found Message
485  m_Widgets.m_FilterPanelComponent.SetItemsFoundMessage(m_iEntriesCurrent, m_iEntriesTotal, m_iEntriesCurrent != m_iEntriesTotal);
486  }
487 
488  //------------------------------------------------------------------------------------------------
489  array<MissionWorkshopItem> SearchScenarios(array<MissionWorkshopItem> scenarios, string searchStr)
490  {
491  array<MissionWorkshopItem> scenariosOut = {};
492 
493  if (!searchStr.IsEmpty())
494  {
495  string searchStrLower = searchStr;
496  searchStrLower.ToLower();
497  foreach (MissionWorkshopItem scenario : scenarios)
498  {
499  // Name
500  if (SearchStringLocalized(scenario.Name(), searchStrLower))
501  {
502  scenariosOut.Insert(scenario);
503  continue;
504  }
505 
506  // Description
507  if (SearchStringLocalized(scenario.Description(), searchStrLower))
508  {
509  scenariosOut.Insert(scenario);
510  continue;
511  }
512  }
513  }
514  else
515  {
516  scenariosOut.Copy(scenarios);
517  }
518 
519  return scenariosOut;
520  }
521 
522  //------------------------------------------------------------------------------------------------
523  static bool GetHostingAllowed()
524  {
525  #ifdef HOST_SCENARIO_ENABLED
526  return true;
527  #else
528  return false;
529  #endif
530  }
531 }
532 
533 
534 // Classes to compare mission headers
535 // Sort by name
536 class SCR_CompareMissionName : SCR_SortCompare<MissionWorkshopItem>
537 {
538  override static int Compare(MissionWorkshopItem left, MissionWorkshopItem right)
539  {
540  string name1 = ResolveName(left.Name());
541  string name2 = ResolveName(right.Name());
542 
543  if (name1.Compare(name2) == -1)
544  return 1;
545  else
546  return 0;
547  }
548 
549  static string ResolveName(string name)
550  {
551  if (name.StartsWith("#"))
552  return WidgetManager.Translate(name);
553  else
554  return name;
555  }
556 }
557 
558 // Sort by name
559 class SCR_CompareMissionAddonName : SCR_SortCompare<MissionWorkshopItem>
560 {
561  override static int Compare(MissionWorkshopItem left, MissionWorkshopItem right)
562  {
563  WorkshopItem ownerItem = left.GetOwner();
564 
565 
566  string name1 = ResolveAddonName(left);
567  string name2 = ResolveAddonName(right);
568 
569  if (name1.Compare(name2) == -1)
570  return 1;
571  else
572  return 0;
573  }
574 
575  static string ResolveAddonName(MissionWorkshopItem scenario)
576  {
577 
578  WorkshopItem sourceAddon = scenario.GetOwner();
579  if (!sourceAddon)
580  return WidgetManager.Translate("#AR-Editor_Attribute_OverlayLogo_Reforger");
581  else
582  return sourceAddon.Name();
583  }
584 }
585 
586 // Sort by player count
587 class SCR_CompareMissionPlayerCount : SCR_SortCompare<MissionWorkshopItem>
588 {
589  override static int Compare(MissionWorkshopItem left, MissionWorkshopItem right)
590  {
591  return left.GetPlayerCount() < right.GetPlayerCount();
592  }
593 }
594 
595 // Sort by favouriteness
596 class SCR_CompareMissionFavourite : SCR_SortCompare<MissionWorkshopItem>
597 {
598  override static int Compare(MissionWorkshopItem left, MissionWorkshopItem right)
599  {
600  return right.IsFavorite();
601  }
602 }
603 
604 // Sort by time since last played
605 class SCR_CompareMissionTimeSinceLastPlay : SCR_SortCompare<MissionWorkshopItem>
606 {
607  override static int Compare(MissionWorkshopItem left, MissionWorkshopItem right)
608  {
609  int timeLeft = left.GetTimeSinceLastPlay();
610  if (timeLeft < 0) // Negative value means we have never played this.
611  timeLeft = 0x7FFFFFFF; // We set it to max positive int for sorting purpuse.
612  int timeRight = right.GetTimeSinceLastPlay();
613  if (timeRight < 0)
614  timeRight = 0x7FFFFFFF;
615 
616  return timeLeft < timeRight;
617  }
618 }
MESSAGE_TAG_NOTHING_FOUND
const protected string MESSAGE_TAG_NOTHING_FOUND
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:19
SCR_ContentBrowser_ScenarioSubMenuWidgets
Definition: SCR_ContentBrowser_ScenarioSubMenuWidgets.c:4
m_Widgets
protected ref SCR_ContentBrowser_ScenarioSubMenuWidgets m_Widgets
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:27
ScenarioList_CreateMissionEntries
protected void ScenarioList_CreateMissionEntries(array< MissionWorkshopItem > scenarios, bool setNewFocus)
Creates lines for missions in the scroll view.
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:353
m_WorkshopApi
protected WorkshopApi m_WorkshopApi
Definition: SCR_ContentBrowser_AddonsSubMenu.c:48
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
Continue
override void Continue(MissionWorkshopItem scenario)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:116
InitWidgets
override void InitWidgets()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:87
EScenarioSubMenuMode
EScenarioSubMenuMode
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:1
OnSearchConfirm
protected void OnSearchConfirm(SCR_EditBoxComponent comp, string newValue)
Called when user confirms the value in the seacrh string.
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:439
MESSAGE_TAG_NOTHING_FOUND_2
const protected string MESSAGE_TAG_NOTHING_FOUND_2
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:20
SCR_CompareMissionTimeSinceLastPlay
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:605
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
Compare
SCR_CompareMissionName SCR_SortCompare Compare(MissionWorkshopItem left, MissionWorkshopItem right)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:561
MESSAGE_TAG_NOTHING_RECENT_2
const protected string MESSAGE_TAG_NOTHING_RECENT_2
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:24
OnSortingHeaderChange
protected void OnSortingHeaderChange(SCR_SortHeaderComponent sortHeader)
Called when sorting header changes.
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:446
m_iEntriesTotal
protected int m_iEntriesTotal
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:31
MODE_ALL
MODE_ALL
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:2
SCR_ContentBrowser_ScenarioLineComponent
Definition: SCR_ContentBrowser_ScenarioLineComponent.c:4
SCR_WorkshopItem
Definition: SCR_WorkshopItem.c:21
UpdateNavigationButtons
override void UpdateNavigationButtons(bool visible=true)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:99
OnScenarioStateChanged
override void OnScenarioStateChanged(SCR_ContentBrowser_ScenarioLineComponent comp)
Called from scenario line component when scenario state changes.
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:134
CreateLines
protected void CreateLines(Widget w)
Definition: SCR_ServicesStatusDialogComponent.c:133
m_iEntriesCurrent
protected int m_iEntriesCurrent
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:32
SCR_CompareMissionPlayerCount
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:587
Attribute
enum EScenarioSubMenuMode Attribute("0", UIWidgets.ComboBox, "Mode in which this submenu must work.", "", ParamEnumArray.FromEnum(EScenarioSubMenuMode))] EScenarioSubMenuMode m_eMode
OnRestartConfirmed
override void OnRestartConfirmed()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:126
RECENTLY_PLAYED_MAX_ENTRIES
const protected int RECENTLY_PLAYED_MAX_ENTRIES
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:15
ScenarioList_ClearMissionEntries
protected void ScenarioList_ClearMissionEntries()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:339
UpdateScenarioList
protected void UpdateScenarioList(bool setNewFocus)
Requests missions from API and shows them in the list.
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:143
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
MESSAGE_TAG_NOTHING_FAVOURITE
const protected string MESSAGE_TAG_NOTHING_FAVOURITE
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:21
OnTabCreate
override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout, int index)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:35
SearchScenarios
array< MissionWorkshopItem > SearchScenarios(array< MissionWorkshopItem > scenarios, string searchStr)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:489
MODE_RECENT
MODE_RECENT
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:5
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition: ChimeraMenuBase.c:3
MESSAGE_TAG_NOTHING_FAVOURITE_2
const protected string MESSAGE_TAG_NOTHING_FAVOURITE_2
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:22
SetPanelsMode
void SetPanelsMode(bool showEmptyPanel, string messagePresetTag=string.Empty)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:464
OnTabHide
override void OnTabHide()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:61
InitWorkshopApi
protected void InitWorkshopApi()
Definition: SCR_ContentBrowser_AddonsSubMenu.c:299
SCR_AddonManager
Definition: SCR_AddonManager.c:72
SCR_CompareMissionName
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:536
SCR_EditBoxComponent
Definition: SCR_EditBoxComponent.c:8
MODE_FAVOURITE
MODE_FAVOURITE
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:3
m_wBeforeSort
protected Widget m_wBeforeSort
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:29
Play
override void Play(MissionWorkshopItem scenario)
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:106
MESSAGE_TAG_NOTHING_RECENT
const protected string MESSAGE_TAG_NOTHING_RECENT
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:23
SCR_SortHeaderComponent
Definition: SCR_SortHeaderComponent.c:7
OnTabShow
override void OnTabShow()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:50
ESortOrder
ESortOrder
Definition: SCR_SortElementComponent.c:1
SCR_ContentBrowser_ScenarioSubMenuBase
Definition: SCR_ContentBrowser_ScenarioSubMenuBase.c:5
OnMenuFocusGained
override void OnMenuFocusGained()
Definition: SCR_ContentBrowser_ScenarioSubMenu.c:70