Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ContentBrowserEditorUIComponent.c
Go to the documentation of this file.
1 
5 {
6  [Attribute()]
7  protected ref array<ref SCR_ContentBrowserEditorCard> m_aCardPrefabs;
8  [Attribute("4", desc: "Speed value passed to WidgetAnimator, 1 = 1sec, higher = faster")]
9  private float m_iCardFadeInSpeed;
10 
11  [Attribute(params: "layout")]
12  private ResourceName m_sCardPrefab;
13 
14  [Attribute(params: "layout")]
15  private ResourceName m_sEmptyCardPrefab;
16 
17  [Attribute(params: "layout")]
18  private ResourceName m_sUndefinedCardPrefab;
19 
20  [Attribute("Title")]
21  protected string m_sHeaderWidgetName;
22 
23  [Attribute("Filters")]
24  private string m_sLabelComponentWidget;
25 
26  [Attribute("NoFilterResults")]
27  protected string m_sNoFilterResultsWidgetName;
28 
29  [Attribute(defvalue: "ResetFilterButton")]
30  protected string m_sResetFiltersButtonName;
31 
32  [Attribute("EditBoxSearch")]
33  private string m_sSearchEditBoxName;
34 
35  [Attribute("Scroll")]
36  private string m_sScrollLayoutName;
37 
38  [Attribute("LoadingCircle")]
39  private string m_sContentLoadingWidgetName;
40 
41  [Attribute(defvalue: "ToggleBetweenCardAndFilter")]
42  protected string m_sToggleCardFilterButton;
43 
44  [Attribute(defvalue: "ToggleSearch")]
45  protected string m_sToggleSearchButton;
46 
47  [Attribute(defvalue: "ActiveFilters")]
48  protected string m_sActiveFiltersName;
49 
50  [Attribute(defvalue: "SelectButton")]
51  protected string m_sSelectCardButtonName;
52 
53  [Attribute(defvalue: "ToggleButton")]
54  protected string m_sToggleFilterdButtonName;
55 
56  [Attribute("SOUND_E_OPENASSETBROWSER", UIWidgets.EditBox, "")]
57  protected string m_sSfxOnOpenDialog;
58 
59  [Attribute(SCR_SoundEvent.CLICK_CANCEL, UIWidgets.EditBox, "Played when no entity card is selected on close dialog")]
60  protected string m_sSfxOnCloseDialog;
61 
62  private SCR_EditableEntityCore m_EntityCore;
63  private SCR_BudgetEditorComponent m_BudgetManager;
64  private SCR_ContentBrowserEditorComponent m_ContentBrowserManager;
65  private SCR_PlacingEditorComponent m_PlacingManager;
66  private EditorBrowserDialogUI m_ContentBrowserDialog;
67 
68  private SCR_ContentBrowserFiltersEditorUIComponent m_LabelsUIComponent;
69 
70  protected Widget m_wFocusedCard;
71  protected int m_iCardFocusIndex;
72  protected bool m_bBudgetPreviewUpdateEnabled;
73  protected bool m_bUsingGamePad;
74  protected bool m_bFocusingAssetCard;
75  protected bool m_bSearchIsToggled;
76  protected bool m_bContentLoadingWidgetActive;
77  protected bool m_bAnimateEntries;
78  protected SCR_InputButtonComponent m_wToggleCardFilterButton;
79 
80  //Widget refs
81  protected Widget m_wToggleSearchButton;
82  protected Widget m_LastSelectedOnSearch;
83  protected Widget m_NoFilterResultsWidget;
84  protected Widget m_SelectCardButton;
85  protected Widget m_ToggleFilterdButton;
86 
87  protected Widget m_ContentLoadingVisual;
88  protected SCR_EditBoxComponent m_SearchEditBox;
89  protected ScrollLayoutWidget m_ScrollLayout;
90  protected ref array<string> m_aLocalizationKeys = {};
91 
92  private ref ScriptInvoker m_LabelApplyCallback = new ScriptInvoker();
93  private ref ScriptInvoker m_ShowLoadingCircleCallback = new ScriptInvoker();
94 
95  protected bool m_bCardSelected; //~ If card selected then no close Sfx is played
96 
100  void OnCardLMB(Widget assetWidget)
101  {
103  if (!placingManager) return;
104 
105  int entryIndex = GetEntryIndex(assetWidget);
106  int prefabID = m_ContentBrowserManager.GetFilteredPrefabID(entryIndex);
107 
108  ResourceName prefab = m_ContentBrowserManager.GetResourceNamePrefabID(prefabID);
109 
110  if (placingManager.SetSelectedPrefab(prefab, showBudgetMaxNotification: true))
111  {
112  // Only close window if prefab can be selected
113  CloseContentBrowser();
114  m_bCardSelected = true;
115  }
116  }
117 
121  void CloseContentBrowser()
122  {
123  m_bBudgetPreviewUpdateEnabled = false;
124  if (m_ContentBrowserDialog)
125  m_ContentBrowserDialog.Close();
126  }
127 
128  override void ShowEntries(Widget contentWidget, int indexStart, int indexEnd)
129  {
130  WorkspaceWidget workspace = GetGame().GetWorkspace();
131 
132  //Show no result indicator and hide grid
133  bool showNoResults = indexEnd == 0 && !m_bContentLoadingWidgetActive;
134  if (m_NoFilterResultsWidget)
135  m_NoFilterResultsWidget.SetVisible(showNoResults);
136  contentWidget.SetVisible(!showNoResults);
137 
138  ResourceName cardPrefab, defaultCardPrefab;
139  foreach (SCR_ContentBrowserEditorCard cardPrefabCandidate: m_aCardPrefabs)
140  {
141  if (cardPrefabCandidate.m_EntityType == EEditableEntityType.GENERIC)
142  {
143  defaultCardPrefab = cardPrefabCandidate.m_sPrefab;
144  break;
145  }
146  }
147 
148  Widget firstCard;
149  SCR_EditableEntityUIInfo entityInfo;
150  ScriptCallQueue callQueue = GetGame().GetCallqueue();
151  for (int i = indexStart; i < indexEnd; i++)
152  {
153  int prefabID = m_ContentBrowserManager.GetFilteredPrefabID(i);
154  entityInfo = m_ContentBrowserManager.GetInfo(prefabID);
155 
156  cardPrefab = m_sUndefinedCardPrefab;
157  if (entityInfo)
158  {
159  cardPrefab = defaultCardPrefab;
160  foreach (SCR_ContentBrowserEditorCard cardPrefabCandidate: m_aCardPrefabs)
161  {
162  if (cardPrefabCandidate.m_EntityType == entityInfo.GetEntityType())
163  {
164  cardPrefab = cardPrefabCandidate.m_sPrefab;
165  break;
166  }
167  }
168  }
169 
170  //--- Create card
171  Widget assetWidget = workspace.CreateWidgets(cardPrefab, contentWidget);
172  if (!assetWidget) continue;
173 
175  if (!assetCard)
176  {
177  Print("Asset widget is missing SCR_AssetCardFrontUIComponent!", LogLevel.ERROR);
178  assetWidget.RemoveFromHierarchy();
179  continue;
180  }
181 
182  SCR_UIInfo blockingBudgetInfo;
183  array<ref SCR_EntityBudgetValue> budgetCosts = { };
184 
185  if (!m_PlacingManager.HasPlacingFlag(EEditorPlacingFlags.CHARACTER_PLAYER))
186  m_ContentBrowserManager.CanPlace(prefabID, budgetCosts, blockingBudgetInfo);
187 
188  //Set card focus
189  if (firstCard == null)
190  firstCard = assetCard.GetButtonWidget();
191 
192  //if (prefabID == m_iCardFocusIndex)
193  // m_wFocusedCard = assetCard.GetButtonWidget();
194 
195  assetCard.GetOnHover().Insert(OnCardHover);
196  assetCard.GetOnFocus().Insert(OnCardFocus);
197  assetCard.InitCard(prefabID, entityInfo, m_ContentBrowserManager.GetResourceNamePrefabID(prefabID), blockingBudgetInfo);
198  ButtonActionComponent.GetOnAction(assetWidget, true, 0).Insert(OnCardLMB);
199 
200  if (m_bAnimateEntries)
201  {
202  assetWidget.SetOpacity(0);
203  int cardIndexOnPage = (i - indexStart);
204 
205  callQueue.CallLater(AnimateCardFadeIn, cardIndexOnPage * 20, false, assetWidget);
206  }
207  }
208 
209  //No focused card
210  if (m_wFocusedCard == null)
211  m_wFocusedCard = firstCard;
212 
213  /* Currently overridden by paging focus
214  if (m_wFocusedCard)
215  {
216  m_FocusedIndex[0] = UniformGridSlot.GetRow(m_wFocusedCard);
217  m_FocusedIndex[1] = UniformGridSlot.GetColumn(m_wFocusedCard);
218  GetGame().GetWorkspace().SetFocusedWidget(m_wFocusedCard);
219  }
220  */
221 
222  m_bAnimateEntries = false;
223  m_bBudgetPreviewUpdateEnabled = true;
224  }
225 
226  override int GetEntryCount()
227  {
228  if (m_ContentBrowserManager && !m_bContentLoadingWidgetActive)
229  {
230  return m_ContentBrowserManager.GetFilteredPrefabCount();
231  }
232  else
233  {
234  return 0;
235  }
236  }
237 
238  protected void AnimateCardFadeIn(Widget cardWidget)
239  {
240  AnimateWidget.Opacity(cardWidget, 1.0, m_iCardFadeInSpeed);
241  }
242 
243  protected void ToggleBetweenCardsAndFilters()
244  {
245  if (m_bFocusingAssetCard)
246  SwitchToFilters();
247  else
248  SwitchToAssetCards();
249 
250  GamepadToggleSelectButtonSwap();
251  }
252 
253  protected void SwitchToAssetCards()
254  {
255  if (!m_wFocusedCard)
256  return;
257 
258  WorkspaceWidget workspace = GetGame().GetWorkspace();
259  if (!workspace)
260  return;
261 
262  workspace.SetFocusedWidget(m_wFocusedCard);
263  }
264 
265  protected void GamepadToggleSelectButtonSwap()
266  {
267  m_SelectCardButton.SetVisible(m_bFocusingAssetCard);
268  m_ToggleFilterdButton.SetVisible(!m_bFocusingAssetCard);
269  }
270 
271  protected void SwitchToFilters()
272  {
273  WorkspaceWidget workspace = GetGame().GetWorkspace();
274  if (!workspace)
275  return;
276 
277  if (m_LabelsUIComponent)
278  workspace.SetFocusedWidget(m_LabelsUIComponent.GetLastFocusedLabel());
279  }
280 
281  protected void GamePadSwitchToggleSearch()
282  {
283  if (m_bSearchIsToggled)
284  GamePadToggleSearch(false, false);
285  else
286  GamePadToggleSearch(true, false);
287  }
288 
289  protected void GamePadToggleSearch(bool toggle, bool forceToggle = true)
290  {
291  WorkspaceWidget workspace = GetGame().GetWorkspace();
292  if (!workspace)
293  return;
294 
295  Widget focusedWidget = workspace.GetFocusedWidget();
296  if (!forceToggle && (focusedWidget == m_SearchEditBox.GetRootWidget() || focusedWidget == m_SearchEditBox.m_wEditBox))
297  {
298  EditBoxWidget.Cast(m_SearchEditBox.m_wEditBox).ActivateWriteMode();
299  }
300  else if (m_bSearchIsToggled != toggle)
301  {
302  m_bSearchIsToggled = toggle;
303 
304  if (m_bSearchIsToggled)
305  {
306  workspace.SetFocusedWidget(m_SearchEditBox.GetRootWidget());
307  EditBoxWidget.Cast(m_SearchEditBox.m_wEditBox).ActivateWriteMode();
308  }
309  else
310  {
311  workspace.SetFocusedWidget(m_wFocusedCard);
312  }
313  }
314  }
315 
316  protected void ResetSearch()
317  {
318  if (m_SearchEditBox)
319  {
320  m_SearchEditBox.SetValue(string.Empty);
321  }
322  m_ContentBrowserManager.SetCurrentSearch(string.Empty);
323  m_ContentBrowserManager.SetPageIndex(0);
324  m_ContentBrowserManager.SaveBrowserState();
325 
326  if (m_bUsingGamePad)
327  GamePadToggleSearch(false);
328  }
329 
330  protected void FilterEntries(bool resetPage = true, bool resetSearch = true, bool animateEntries = false)
331  {
332  // Search
333  if (resetSearch)
334  {
335  ResetSearch();
336  }
337  else
338  {
339  string searchInputText = m_SearchEditBox.GetValue().Trim();
340  if (!searchInputText.IsEmpty() && searchInputText != m_ContentBrowserManager.GetCurrentSearch())
341  {
342  m_ContentBrowserManager.SetCurrentSearch(searchInputText);
343  }
344  }
345 
346  if (resetPage)
347  {
348  m_ContentBrowserManager.SetPageIndex(0);
349  }
350 
351 
352  m_ContentBrowserManager.FilterEntries();
353 
354  // Set page
355  m_bAnimateEntries = animateEntries;
356 
357  SetPage(m_ContentBrowserManager.GetPageIndex(), true);
358  }
359 
360  protected void OnInputDeviceIsGamepadScripted(bool isGamepad)
361  {
362  m_bUsingGamePad = isGamepad;
363 
364  if (m_bFocusingAssetCard)
365  OnCardHover(null, -1, true);
366  else
367  OnCardHover(null, -1, false);
368 
369  if (isGamepad)
370  {
371  GamepadToggleSelectButtonSwap();
372  }
373  else
374  {
375  m_SelectCardButton.SetVisible(false);
376  m_ToggleFilterdButton.SetVisible(false);
377  }
378 
379  if (!m_SearchEditBox)
380  return;
381 
382  if (!m_bUsingGamePad)
383  {
384  GamePadToggleSearch(false);
385  }
386  else
387  {
388  WorkspaceWidget workspace = GetGame().GetWorkspace();
389  if (!workspace)
390  return;
391 
392  workspace.SetFocusedWidget(m_SearchEditBox.GetRootWidget());
393  }
394  }
395 
396  protected void OnCardHover(Widget card, int prefabIndex, bool hover)
397  {
398  if (!hover)
399  {
400  m_ContentBrowserManager.RefreshPreviewCost();
401  return;
402  }
403 
404  if (!m_bBudgetPreviewUpdateEnabled || m_bUsingGamePad) return;
405 
406  m_ContentBrowserManager.RefreshPreviewCost(prefabIndex);
407 
408  }
409 
410  protected void OnCardFocus(Widget card, int prefabIndex, bool focus)
411  {
412  if (!m_bUsingGamePad) return;
413 
414  m_bFocusingAssetCard = focus;
415  GamepadToggleSelectButtonSwap();
416 
417  if (m_bFocusingAssetCard)
418  {
419  m_wToggleCardFilterButton.SetLabel("#AR-Editor_ContentBrowser_SwitchToFilters");
420  }
421  else
422  {
423  m_wToggleCardFilterButton.SetLabel("#AR-Editor_ContentBrowser_SwitchToCards");
424  m_ContentBrowserManager.RefreshPreviewCost();
425  return;
426  }
427 
428  if (card)
429  {
430  m_wFocusedCard = card;
431  m_iCardFocusIndex = prefabIndex;
432  m_ContentBrowserManager.RefreshPreviewCost(prefabIndex);
433  }
434  }
435 
436  protected void OnSearchFocusChanged(SCR_EditBoxComponent editBoxComponent, EditBoxWidget editBoxWidget, bool focus)
437  {
438  if (focus != m_bSearchIsToggled)
439  m_bSearchIsToggled = focus
440  }
441 
442  protected void OnSearchConfirmed(SCR_EditBoxComponent editBox, string text)
443  {
444  string search = text.Trim();
445  m_ContentBrowserManager.SetCurrentSearch(search);
446 
447  FilterEntries(true, false, true);
448 
449  //If using gamepad make sure search box is no longer selected
450  if (m_bUsingGamePad && m_wFocusedCard)
451  GamePadToggleSearch(false);
452  }
453 
454  //~ After Browser state is loaded
455  protected void OnBrowserEntriesFiltered()
456  {
457  m_SearchEditBox.SetValue(m_ContentBrowserManager.GetCurrentSearch());
458 
459  m_bAnimateEntries = true;
460  SetPage(m_ContentBrowserManager.GetPageIndex(), true);
461  }
462 
463  protected void OnMenuClosed()
464  {
466  {
467  m_ContentBrowserManager.OnMenuClosed();
468  }
469  }
470 
471  protected void OnResetClicked()
472  {
473  m_LabelsUIComponent.OnResetClicked();
474  m_ContentBrowserManager.ResetBrowserState(false);
475  }
476 
477  protected void OnShowLoadingCircle(bool state = true)
478  {
479  if (m_bContentLoadingWidgetActive == state)
480  {
481  return;
482  }
483  m_ContentLoadingVisual.SetVisible(state);
484  m_bContentLoadingWidgetActive = state;
485 
486  RefreshPage();
487 
488  m_ContentBrowserManager.SetSaveStateTabsEnabled(!state);
489  }
490 
491  protected void OnApplyLabelChanges()
492  {
493  OnShowLoadingCircle(false);
494  FilterEntries(true, false, true);
495  }
496 
497  protected void InitializeLabels()
498  {
499  Widget labelsWidget = GetWidget().FindAnyWidget(m_sLabelComponentWidget);
500  if (!labelsWidget) return;
501 
502  m_LabelsUIComponent = SCR_ContentBrowserFiltersEditorUIComponent.Cast(labelsWidget.FindHandler(SCR_ContentBrowserFiltersEditorUIComponent));
503  if (!m_LabelsUIComponent) return;
504 
505  m_LabelsUIComponent.SetContentBrowserCallbacks(m_ShowLoadingCircleCallback, m_LabelApplyCallback);
506 
507  Widget activeFilters = GetWidget().FindAnyWidget(m_sActiveFiltersName);
508  if (activeFilters)
509  {
511 
512  if (activeFilterComponent)
513  activeFilterComponent.Init(m_LabelsUIComponent);
514  }
515  }
516 
517  //~ Returns the UI Info of highest ordered label (in the highest ordered group)
518  protected SCR_UIInfo GetHighestOrderedLabelUIInfo(notnull array<EEditableEntityLabel> labels)
519  {
520  EEditableEntityLabelGroup groupLabel;
521 
522  int newLabelOrder;
523  int newLabelGroupOrder;
524 
525  int lowestGroupOrder = int.MAX;
526  int lowestLabelOrder = int.MAX;
527 
528  EEditableEntityLabel highestOrderedLabel;
529 
530  foreach (EEditableEntityLabel label: labels)
531  {
532  m_ContentBrowserManager.GetLabelGroupType(label, groupLabel);
533  newLabelGroupOrder = m_ContentBrowserManager.GetLabelGroupOrder(groupLabel);
534 
535  if (newLabelGroupOrder <= lowestGroupOrder)
536  {
537  newLabelOrder = m_ContentBrowserManager.GetLabelOrderInGroup(label);
538 
539  if (newLabelOrder < lowestLabelOrder)
540  {
541  lowestGroupOrder = newLabelGroupOrder;
542  lowestLabelOrder = newLabelOrder;
543  highestOrderedLabel = label;
544  }
545  }
546  }
547 
548  SCR_UIInfo uiInfo;
549  m_ContentBrowserManager.GetLabelUIInfo(highestOrderedLabel, uiInfo);
550  return uiInfo;
551  }
552 
553  protected override bool IsUnique()
554  {
555  return true;
556  }
557 
558  protected override void OnButtonPrev()
559  {
560  if (m_bPlayAudioOnPageChange)
561  SCR_UISoundEntity.SoundEvent(m_sOnPrevPageSfx, true);
562 
563  int previousPageIndex = m_iCurrentPage - 1;
564  if (SetPage(previousPageIndex))
565  {
566  m_ContentBrowserManager.SetPageIndex(previousPageIndex);
567  }
568  }
569 
570  protected override void OnButtonNext()
571  {
572  if (m_bPlayAudioOnPageChange)
573  SCR_UISoundEntity.SoundEvent(m_sOnPrevPageSfx, true);
574 
575  int nextPageIndex = m_iCurrentPage + 1;
576  if (SetPage(nextPageIndex))
577  {
578  m_ContentBrowserManager.SetPageIndex(nextPageIndex);
579  }
580  }
581 
582  override protected void HandlerAttachedScripted(Widget w)
583  {
584  super.HandlerAttachedScripted(w);
585 
586  Widget toggleBetweenCardAndFilter = w.FindAnyWidget(m_sToggleCardFilterButton);
587 
588  if (toggleBetweenCardAndFilter)
589  {
590  ButtonActionComponent.GetOnAction(toggleBetweenCardAndFilter, false, 0).Insert(ToggleBetweenCardsAndFilters);
591  m_wToggleCardFilterButton = SCR_InputButtonComponent.Cast(toggleBetweenCardAndFilter.FindHandler(SCR_InputButtonComponent));
592  }
593 
594  // Disable budget preview update during loading, prevent OnCardHover callbacks during init
595  m_bBudgetPreviewUpdateEnabled = false;
596 
597  if (SCR_Global.IsEditMode()) return;
598 
600  if (!m_EntityCore)
601  return;
602 
605  return;
606 
607  m_ContentBrowserManager.SetPageEntryCount(GetRows() * GetColumns());
608 
610  m_BudgetManager = SCR_BudgetEditorComponent.Cast(SCR_BudgetEditorComponent.GetInstance(SCR_BudgetEditorComponent, false, true));
611 
612  m_ContentBrowserDialog = EditorBrowserDialogUI.Cast(GetMenu());
613  m_ContentBrowserDialog.GetOnMenuHide().Insert(OnMenuClosed);
614 
615  m_NoFilterResultsWidget = w.FindAnyWidget(m_sNoFilterResultsWidgetName);
616 
617  m_SelectCardButton = w.FindAnyWidget(m_sSelectCardButtonName);
618  m_ToggleFilterdButton = w.FindAnyWidget(m_sToggleFilterdButtonName);
619 
620  Widget resetFiltersButton = w.FindAnyWidget(m_sResetFiltersButtonName);
621  if (resetFiltersButton)
622  {
623  ButtonActionComponent.GetOnAction(resetFiltersButton, false, 0).Insert(OnResetClicked);
624  }
625 
626  m_SearchEditBox = SCR_EditBoxComponent.GetEditBoxComponent(m_sSearchEditBoxName, w, true);
627  if (m_SearchEditBox)
628  {
629  m_SearchEditBox.m_OnConfirm.Insert(OnSearchConfirmed);
630  m_SearchEditBox.m_OnFocusChangedEditBox.Insert(OnSearchFocusChanged);
631 
632  if (m_ContentBrowserManager.GetCurrentSearch())
633  {
634  m_SearchEditBox.SetValue(m_ContentBrowserManager.GetCurrentSearch());
635  }
636  }
637 
638  m_ContentLoadingVisual = w.FindAnyWidget(m_sContentLoadingWidgetName);
639  if (!m_ContentLoadingVisual)
640  Print("'SCR_ContentBrowserEditorUIComponent' cannot find 'm_ContentLoadingVisual'!", LogLevel.WARNING);
641 
642  m_ShowLoadingCircleCallback.Insert(OnShowLoadingCircle);
643  m_LabelApplyCallback.Insert(OnApplyLabelChanges);
644 
645  m_wToggleSearchButton = w.FindAnyWidget(m_sToggleSearchButton);
646  if (m_wToggleSearchButton)
647  ButtonActionComponent.GetOnAction(m_wToggleSearchButton, false, 0).Insert(GamePadSwitchToggleSearch);
648 
649  //Input device changed
650  OnInputDeviceIsGamepadScripted(!GetGame().GetInputManager().IsUsingMouseAndKeyboard());
651  GetGame().OnInputDeviceIsGamepadInvoker().Insert(OnInputDeviceIsGamepadScripted);
652 
653  InitializeLabels();
654 
655  if (m_ContentBrowserManager.GetContentBrowserDisplayConfig())
656  {
657  string header = m_ContentBrowserManager.GetContentBrowserDisplayConfig().GetHeader();
658 
659  if (header != string.Empty)
660  {
661  TextWidget headerWidget = TextWidget.Cast(w.FindAnyWidget(m_sHeaderWidgetName));
662 
663  if (headerWidget)
664  headerWidget.SetText(header);
665  }
666  }
667 
668  m_ContentBrowserManager.GetOnBrowserEntriesFiltered().Insert(OnBrowserEntriesFiltered);
669  m_ContentBrowserManager.GetOnBrowserStateCleared().Insert(OnBrowserEntriesFiltered);
670  m_ContentBrowserManager.RefreshPreviewCost();
671 
672  SCR_UISoundEntity.SoundEvent(m_sSfxOnOpenDialog, true);
673 
674  m_bAnimateEntries = true;
675 
676  SetPage(m_ContentBrowserManager.GetPageIndex());
677 
678  if (m_BudgetManager)
679  m_BudgetManager.DemandBudgetUpdateFromServer();
680  }
681 
682  override protected void HandlerDeattached(Widget w)
683  {
684  super.HandlerDeattached(w);
685 
686  //Input device changed
687  GetGame().OnInputDeviceIsGamepadInvoker().Remove(OnInputDeviceIsGamepadScripted);
688 
689  if (SCR_Global.IsEditMode()) return;
690 
691  m_ShowLoadingCircleCallback.Remove(OnShowLoadingCircle);
692  m_LabelApplyCallback.Remove(OnApplyLabelChanges);
693 
694  m_ContentBrowserDialog.GetOnMenuHide().Remove(OnMenuClosed);
695 
697  {
698  m_ContentBrowserManager.SetExtendedEntity(null);
699 
700  //~ State loading
701  m_ContentBrowserManager.GetOnBrowserEntriesFiltered().Remove(OnBrowserEntriesFiltered);
702  m_ContentBrowserManager.GetOnBrowserStateCleared().Remove(OnBrowserEntriesFiltered);
703  }
704 
705  if (m_SearchEditBox)
706  {
707  m_SearchEditBox.m_OnConfirm.Remove(OnSearchConfirmed);
708  }
709 
710  if (!m_bCardSelected)
711  SCR_UISoundEntity.SoundEvent(m_sSfxOnCloseDialog, true);
712  }
713 };
714 
717 {
718  [Attribute(uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EEditableEntityType))]
719  EEditableEntityType m_EntityType;
720 
721  [Attribute(params: "layout")]
722  ResourceName m_sPrefab;
723 };
EEditableEntityLabel
EEditableEntityLabel
Definition: EEditableEntityLabel.c:1
SCR_BasePaginationUIComponent
Definition: SCR_BasePaginationUIComponent.c:1
SCR_EditableEntityCore
Definition: SCR_EditableEntityCore.c:10
m_iCurrentPage
protected int m_iCurrentPage
Definition: SCR_ContentBrowser_AddonsSubMenu.c:75
SCR_ContentBrowserEditorUIComponent
Definition: SCR_ContentBrowserEditorUIComponent.c:4
SetPage
void SetPage(SCR_EProfileSuperMenuTabId page)
Definition: SCR_ProfileSuperMenu.c:34
SCR_UISoundEntity
Definition: SCR_UISoundEntity.c:7
EditorBrowserDialogUI
Definition: EditorBrowserDialogUI.c:3
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_SoundEvent
Definition: SCR_SoundEvent.c:1
SCR_EditableEntityUIInfo
Definition: SCR_EditableEntityUIInfo.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_ContentBrowserEditorComponent
Definition: SCR_ContentBrowserEditorComponent.c:16
SCR_AssetCardFrontUIComponent
Content Browser Card.
Definition: SCR_AssetCardFrontUIComponent.c:4
SCR_BudgetEditorComponent
Definition: SCR_BudgetEditorComponent.c:18
SCR_ContentBrowserActiveFiltersEditorUIComponent
Definition: SCR_ContentBrowserActiveFiltersEditorUIComponent.c:1
m_ContentBrowserManager
protected SCR_ContentBrowserEditorComponent m_ContentBrowserManager
Definition: SCR_CampaignBuildingEditorComponent.c:13
m_PlacingManager
protected SCR_PlacingEditorComponent m_PlacingManager
Definition: SCR_PreviewEntityEditorUIComponent.c:43
GetMenu
SCR_RadialMenu GetMenu()
Definition: SCR_RadialMenuGameModeComponent.c:41
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_EntityCore
protected SCR_EditableEntityCore m_EntityCore
Definition: SCR_CampaignBuildingManagerComponent.c:40
EEditableEntityLabelGroup
EEditableEntityLabelGroup
Definition: EEditableEntityLabel.c:200
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition: EEditableEntityType.c:5
EEditorPlacingFlags
EEditorPlacingFlags
Definition: EEditorPlacingFlags.c:1
ButtonActionComponent
Component to execute action when the button or its shortcut is pressed.
Definition: ButtonActionComponent.c:2
SCR_ContentBrowserFiltersEditorUIComponent
The Filter window of the Content Browser.
Definition: SCR_ContentBrowserFiltersEditorUIComponent.c:5
SCR_UIInfo
Definition: SCR_UIInfo.c:7
SCR_Global
Definition: Functions.c:6
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
SCR_EditBoxComponent
Definition: SCR_EditBoxComponent.c:8
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_ContentBrowserEditorCard
Definition: SCR_ContentBrowserEditorUIComponent.c:716
SCR_PlacingEditorComponent
Definition: SCR_PlacingEditorComponent.c:118
GetWidget
protected Widget GetWidget()
Definition: SCR_VonDisplay.c:155
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468