Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DownloadManager_Dialog.c
Go to the documentation of this file.
1 /*
2 Main dialog of the download manager, which is typically opened from the download manager panel.
3 
4 It lists all current and previous downloads.
5 
6 !!! For the menu to work, it needs a SCR_DownloadManager_Entity to be placed in the world.
7 This is required because the menu can be opened after any of the downloads have been started,
8 but by that time we must store the download references somewhere.
9 */
11 {
12  ACTIVE = 0,
14 }
15 
16 // TODO: move tab specific stuff to a child of SCR_SuperMenuComponent
18 {
19  protected const string STATE_DOWNLOADING = "#AR-Workshop_TabName_Downloaded";
20  protected const string STATE_ALL_PAUSE = "#AR-DownloadManager_State_AllDownloadsPaused";
21  protected const string STATE_NO_ACTIVE_DOWNLOADS = "#AR-DownloadManager_State_NoActiveDownloads";
22  protected const string STR_AFFECTED_MODS = "#AR-Workshop_FailedModsDownload";
23 
24  protected const ResourceName DOWNLOAD_LINE_LAYOUT = "{FB196DBC0ABA6AE4}UI/layouts/Menus/ContentBrowser/DownloadManager/DownloadManagerEntry.layout";
25  protected const string DOWNLOAD_SUMMARY_FORMAT = "%1 / %2";
26  protected const string DOWNLOAD_SUMMARY_COLORED_FORMAT = "<color rgba=%1>%2</color>";
27 
28  protected const string FAILED_ADDON_FORMAT = "- %1 \n";
29  protected const string FAILED_ADDON_LIST_DIALOG = "failed_dialogs_list";
30 
32 
33  // Fail dialogs
37  protected float m_fStorageLimitErrorSize = 0;
38 
39  // Tabs
42 
43  protected static bool m_bOpened = false;
44 
45  //-----------------------------------------------------------------------------------------------
46  static bool IsOpened()
47  {
48  return m_bOpened;
49  }
50 
51  //-----------------------------------------------------------------------------------------------
52  static SCR_DownloadManager_Dialog Create()
53  {
54  return SCR_CommonDialogs.CreateDownloadManagerDialog();
55  }
56 
57  //------------------------------------------------------------------------------------------
58  // Override
59  //------------------------------------------------------------------------------------------
60  //-----------------------------------------------------------------------------------------------
62  {
63  super.OnMenuOpen(preset);
64 
65  // Init widgets
66  m_Widgets.Init(GetRootWidget());
67  GetGame().GetInputManager().AddActionListener("MenuDownloadManager", EActionTrigger.DOWN, OnBackButton);
68 
69  m_Widgets.m_Overlay.SetVisible(false);
70  m_Widgets.m_DownloadSummaryText.SetVisible(false);
71  m_Widgets.m_ProgressText.SetVisible(false);
72 
73  // Setup submenus
74  m_ActiveDownloads = SCR_DownloadManagerListComponent.Cast(m_SuperMenuComponent.GetSubMenu(SCR_EDownloadManagerTabs.ACTIVE));
75  m_HistoryDownloads = SCR_DownloadManagerListComponent.Cast(m_SuperMenuComponent.GetSubMenu(SCR_EDownloadManagerTabs.HISTORY));
76 
77  m_HistoryDownloads.ShowPauseResumeAllButton(false);
78 
79  InitList();
80 
81  // Setup callback
82  SCR_DownloadManager downloadManager = SCR_DownloadManager.GetInstance();
83 
84  downloadManager.m_OnNewDownload.Insert(OnNewDownload);
85  downloadManager.m_OnDownloadComplete.Insert(OnDownloadComplete);
86  downloadManager.m_OnDownloadFailed.Insert(OnDownloadFailed);
87  downloadManager.GetOnFullStorageError().Insert(OnFullStorageError);
88  downloadManager.m_OnDownloadCanceled.Insert(OnDownloadCanceled);
89 
90  m_bOpened = true;
91  }
92 
93  //-----------------------------------------------------------------------------------------------
94  override void OnMenuClose()
95  {
96  super.OnMenuClose();
97 
98  GetGame().GetInputManager().RemoveActionListener("MenuDownloadManager", EActionTrigger.DOWN, OnBackButton);
99 
100  // Clear all recent failed downloads
101  SCR_DownloadManager.GetInstance().ClearFailedDownloads();
102 
103  m_bOpened = false;
104  }
105 
106  //-----------------------------------------------------------------------------------------------
107  override void OnMenuUpdate(float tDelta)
108  {
109  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
110  if (!mgr)
111  return;
112  int nCompleted, nTotal;
113  mgr.GetDownloadQueueState(nCompleted, nTotal);
114 
116  bool pauseCancelEnabled; // True when pause or cancel buttons should be enabled
117  if (dlAction)
118  {
119  if (!dlAction.IsFailed() && !dlAction.IsCompleted() && !dlAction.IsCanceled())
120  pauseCancelEnabled = true;
121  }
122 
123  // Pause All / Resume All button label
124  bool paused = mgr.GetDownloadsPaused();
125  string pauseAllButtonLabel = "#AR-DownloadManager_ButtonPauseAll";
126  if (paused)
127  pauseAllButtonLabel = "#AR-DownloadManager_ButtonResumeAll";
128 
129  // Pause button
130  string pauseButtonLabel = "#AR-DownloadManager_ButtonPause";
131  if (dlAction)
132  {
133  if (dlAction.IsPaused() || dlAction.IsInactive())
134  pauseButtonLabel = "#AR-DownloadManager_ButtonResume";
135  }
136 
137  // Show downlaoding speed
139  UpdateDownloadingSpeedWidget(m_ActiveDownloads.HasContent(), nCompleted == nTotal);
140 
141  if (m_ActiveDownloads.GetShown())
142  m_ActiveDownloads.ShowPauseResumeAllButton(nCompleted != nTotal);
143  else
144  {
145  m_ActiveDownloads.ShowPauseResumeAllButton(false);
146  m_HistoryDownloads.ShowPauseResumeAllButton(false);
147  }
148  }
149 
150  //------------------------------------------------------------------------------------------
151  protected void UpdateProgressWidgets()
152  {
153  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
154  string downloadStateText;
155  int nCompleted, nTotal;
156  mgr.GetDownloadQueueState(nCompleted, nTotal);
157 
158  if (nTotal > 0 && !mgr.GetDownloadsPaused())
159  downloadStateText = string.Format("%1 %2 / %3", WidgetManager.Translate(STATE_DOWNLOADING), nCompleted, nTotal);
160  else if (nTotal > 0 && mgr.GetDownloadsPaused())
161  downloadStateText = string.Format("%1 %2 / %3", WidgetManager.Translate(STATE_ALL_PAUSE), nCompleted, nTotal);
162  else if (mgr.GetDownloadsPaused())
163  downloadStateText = STATE_ALL_PAUSE;
164  else
165  downloadStateText = STATE_NO_ACTIVE_DOWNLOADS;
166 
167  m_Widgets.m_StateText.SetText(downloadStateText);
168 
169  m_Widgets.m_Overlay.SetVisible(m_ActiveDownloads.HasContent());
170  m_Widgets.m_DownloadSummaryText.SetVisible(mgr.HasRunningDownloads() || nCompleted > 0);
171  m_Widgets.m_ProgressText.SetVisible(nTotal > 0);
172 
173  // Progress bar, progress text
174  if (nTotal > 0)
175  {
176  // Get total progress of all downloads
177  array<ref SCR_WorkshopItemActionDownload> downloadQueue = mgr.GetDownloadQueue();
178  float progress = SCR_DownloadManager.GetDownloadActionsProgress(downloadQueue);
179 
180  // Progress bar
181  m_Widgets.m_ProgressBarComponent.SetValue(progress);
182 
183  // Progress percent text
184  string progressText = WidgetManager.Translate("#AR-ValueUnit_Percentage", Math.Floor(progress * 100.0));
185  m_Widgets.m_ProgressText.SetText(progressText);
186 
187  // Display total size
188  float downloadTotalSize = SCR_DownloadManager.GetInstance().GetDownloadQueueSize();
189  m_Widgets.m_DownloadSummaryText.SetVisible(downloadTotalSize > 0);
190 
191  if (downloadTotalSize > 0)
192  {
193  float downloadDoneSize = SCR_DownloadManager.GetInstance().GetDownloadedSize();
194 
195  string downloadDoneSizeStr = SCR_ByteFormat.ContentDownloadFormat(downloadDoneSize);
196  string downloadTotalSizeStr = SCR_ByteFormat.ContentDownloadFormat(downloadTotalSize);
197 
198  string coloredDone = WidgetManager.Translate(DOWNLOAD_SUMMARY_COLORED_FORMAT, UIColors.SRGBAFloatToInt(UIColors.CONTRAST_COLOR), downloadDoneSizeStr);
199  string coloredTotal = WidgetManager.Translate(DOWNLOAD_SUMMARY_COLORED_FORMAT, UIColors.SRGBAFloatToInt(UIColors.CONTRAST_COLOR), downloadTotalSizeStr);
200 
201  m_Widgets.m_DownloadSummaryText.SetText(string.Format(DOWNLOAD_SUMMARY_FORMAT, coloredDone, coloredTotal));
202  }
203  }
204  else
205  {
206  m_Widgets.m_ProgressBarComponent.SetValue(0);
207  }
208  }
209 
210  //------------------------------------------------------------------------------------------
211  protected void UpdateDownloadingSpeedWidget(bool display, bool showFallback)
212  {
213  m_Widgets.m_DownloadSpeed.SetVisible(display);
214  if (!display)
215  return;
216 
217  if (showFallback)
218  {
219  m_Widgets.m_DownloadSpeed.SetText("0 KB/s");
220  return;
221  }
222 
223  string unit = " KB/s";
224  float speed = 0;
225 
226  if (SCR_DownloadManager.GetInstance().HasRunningDownloads())
227  speed = GetGame().GetRestApi().GetDownloadTrafficKBPerS();
228 
229  // Faster speed
230  if (speed > SCR_ByteFormat.BYTE_UNIT_SIZE)
231  {
232  speed /= SCR_ByteFormat.BYTE_UNIT_SIZE;
233  unit = " MB/s";
234  }
235 
236  // Show text
237  m_Widgets.m_DownloadSpeed.SetText(Math.Round(speed).ToString() + unit);
238  }
239 
240  //-----------------------------------------------------------------------------------------------
241  // Custom
242  //-----------------------------------------------------------------------------------------------
243  //-----------------------------------------------------------------------------------------------
244  // Init list of downloads
245  protected void InitList()
246  {
247  array<ref SCR_DownloadManager_Entry> downloads = {};
248  SCR_DownloadManager.GetInstance().GetAllDownloads(downloads);
249 
250  array<ref SCR_WorkshopItemActionDownload> failedDownloads = SCR_DownloadManager.GetInstance().GetFailedDownloads();
251 
252  for (int i = 0, count = downloads.Count(); i < count; i++)
253  {
254  SCR_WorkshopItemActionDownload action = downloads[i].m_Action;
255 
256  if (SCR_DownloadManagerEntry.DownloadActionState(action) == EDownloadManagerActionState.RUNNING)
257  {
258  m_ActiveDownloads.AddEntry(DOWNLOAD_LINE_LAYOUT, action);
259  }
260  else
261  {
262  // Show recent fails in active
263  if (failedDownloads.Find(action) != -1)
264  m_ActiveDownloads.AddEntry(DOWNLOAD_LINE_LAYOUT, action);
265  else
266  m_HistoryDownloads.AddEntry(DOWNLOAD_LINE_LAYOUT, action);
267  }
268  }
269  }
270 
271  //-----------------------------------------------------------------------------------------------
273  {
274  Widget w = GetGame().GetWorkspace().GetFocusedWidget();
275 
276  if (!w)
277  return null;
278 
280  if (!entry)
281  return null;
282 
283  return entry.GetDownloadAction();
284  }
285 
286  //------------------------------------------------------------------------------------------
287  // Callbacks
288  //------------------------------------------------------------------------------------------
289  //------------------------------------------------------------------------------------------
291  {
292  // Remove same item in history
293  SCR_DownloadManagerEntry sameEntry = m_HistoryDownloads.EntryWithItem(item);
294  if (sameEntry)
295  m_HistoryDownloads.RemoveEntry(sameEntry);
296 
297  // Check same item in active
298  sameEntry = m_ActiveDownloads.EntryWithItem(item);
299 
300  if (sameEntry)
301  {
302  m_ActiveDownloads.ChangeEntryCategory(sameEntry.GetRootWidget(), EDownloadManagerActionState.RUNNING);
303  sameEntry.InitForDownloadAction(item, item.GetDownloadAction());
304  }
305  else
306  {
307  // Add action on activate in order to have target version
308  action.m_OnActivated.Insert(OnNewActionActivate);
309  }
310  }
311 
312  //------------------------------------------------------------------------------------------
314  {
315  m_ActiveDownloads.AddEntry(DOWNLOAD_LINE_LAYOUT, action);
316  action.m_OnActivated.Remove(OnNewActionActivate);
317  }
318 
319  //------------------------------------------------------------------------------------------
321  {
322  // Move to downloaded
323  SCR_DownloadManagerEntry entry = m_ActiveDownloads.DownloadActionLine(action);
324 
325  if (entry)
326  m_ActiveDownloads.ChangeEntryCategory(entry.GetRootWidget(), EDownloadManagerActionState.DOWNLOADED);
327  }
328 
329  //------------------------------------------------------------------------------------------
332  protected void OnDownloadFailed(SCR_WorkshopItemActionDownload action, int reason)
333  {
334  array<ref SCR_DownloadManager_Entry> downloads = {};
335  SCR_DownloadManager.GetInstance().GetAllDownloads(downloads);
336 
337  SCR_DownloadManagerEntry entry = m_ActiveDownloads.DownloadActionLine(action);
338 
339  if (entry)
340  m_ActiveDownloads.ChangeEntryCategory(entry.GetRootWidget(), EDownloadManagerActionState.FAILED);
341 
342  // Open active and scroll up
343  m_SuperMenuComponent.GetTabView().ShowTab(SCR_EDownloadManagerTabs.ACTIVE, false);
344  m_ActiveDownloads.ScrollTop();
345 
346  // Show error dialog
347  ShowFailedModsDialog(action, reason);
348  }
349 
350  //------------------------------------------------------------------------------------------
351  protected void ShowFailedModsDialog(SCR_WorkshopItemActionDownload action, int reason)
352  {
353  // Add failed addons to dialog
355  {
357  m_DownloadFailDialogContent.SetMessage(m_DownloadFailDialogContent.GetMessage() + string.Format(FAILED_ADDON_FORMAT, action.GetAddonName()));
358 
359  return;
360  }
361 
362  string message = "";
363 
364  // Choose message dialog
365  switch (reason)
366  {
367  // Connection failed
368  case 1: message = "#AR-Workshop_Dialog_Error_ConnectionTimeout2"; break;
369  }
370 
371  if (!message.IsEmpty())
372  message += "\n";
373 
374  // Create dialog
376  m_DownloadFailDialog.SetMessage(message);
378 
379  // Setup message
380  Widget contentWidget = m_DownloadFailDialog.GetContentLayoutRoot(m_DownloadFailDialog.GetRootWidget());
382  m_DownloadFailDialogContent.SetMessage(STR_AFFECTED_MODS + "\n\n" + string.Format(FAILED_ADDON_FORMAT, action.GetAddonName()));
383  }
384 
385  //-----------------------------------------------------------------------------------------------
387  protected void OnFullStorageError(SCR_WorkshopItemActionDownload action, float size)
388  {
389  // Create dialog
390  if (m_fStorageLimitErrorSize == 0)
391  {
394  return;
395  }
396 
397  // Add to dialog
398  m_fStorageLimitErrorSize += size;
399 
401  m_StorageLimitDialog.AddToSize(size);
402  }
403 
404  //-----------------------------------------------------------------------------------------------
405  protected void CreateStoraLimitError()
406  {
407  // Display dialog
410  }
411 
412  //-----------------------------------------------------------------------------------------------
413  protected void OnStorageLimitDialogClosed()
414  {
416  m_StorageLimitDialog = null;
417  }
418 
419  //------------------------------------------------------------------------------------------
420  protected void OnDownloadFailDialogClose()
421  {
423  m_DownloadFailDialog = null;
425  }
426 
427  //------------------------------------------------------------------------------------------
429  {
430  SCR_DownloadManagerEntry entry = m_ActiveDownloads.DownloadActionLine(action);
431 
432  if (entry)
433  m_ActiveDownloads.ChangeEntryCategory(entry.GetRootWidget(), EDownloadManagerActionState.FAILED);
434  }
435 
436  //-----------------------------------------------------------
437  protected void OnBackButton()
438  {
439  m_OnCancel.Invoke();
440  Close();
441  }
442 
443  //-----------------------------------------------------------
444  protected void OnPauseAllButton()
445  {
446  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
447 
448  if (!mgr)
449  return;
450 
451  bool paused = mgr.GetDownloadsPaused();
452  mgr.SetDownloadsPaused(!paused);
453  }
454 
455  //-----------------------------------------------------------------------------------------------
456  protected void OnPauseButton()
457  {
458  auto action = this.GetSelectedAction();
459 
460  if (!action)
461  return;
462 
463  if (action.IsPaused())
464  action.Resume();
465  else if (action.IsInactive())
466  action.Activate();
467  else
468  action.Pause();
469  }
470 
471  //-----------------------------------------------------------------------------------------------
472  protected void OnCancelButton()
473  {
474  auto action = this.GetSelectedAction();
475 
476  if (!action)
477  return;
478 
479  action.Cancel();
480  }
481 
482  //-----------------------------------------------------------------------------------------------
483  protected void OnAutoenableButton()
484  {
486  //settings.m_bAutoEnableDownloadedAddons = m_Widgets.m_AutoenableAddonsButtonComponent.GetToggled();
487  SCR_WorkshopSettings.Save(settings);
488  }
489 
490  //-----------------------------------------------------------------------------------------------
492  {
493  m_bOpened = false;
494  }
495 
496  //-----------------------------------------------------------------------------------------------
498  {
499 
500  }
501 }
502 
506 //------------------------------------------------------------------------------------------
508 {
509  SCR_InputButtonComponent m_PauseResumeButton;
510  SCR_InputButtonComponent m_CancelButton;
511 
512  //------------------------------------------------------------------------------------------
513  static SCR_DownloadManager_MiniDialog Create()
514  {
516  SCR_DownloadManager_MiniDialog.CreateFromPreset(SCR_WorkshopUiCommon.DIALOGS_CONFIG, "download_manager_mini", dlg);
517  return dlg;
518  }
519 
520  //------------------------------------------------------------------------------------------
521  override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)
522  {
523  m_PauseResumeButton = this.FindButton("download_pause_resume");
524  m_CancelButton = this.FindButton("download_cancel");
525 
526  m_PauseResumeButton.m_OnActivated.Insert(OnPauseResumeButton);
527  m_CancelButton.m_OnActivated.Insert(OnCancelButton);
528  }
529 
530  //------------------------------------------------------------------------------------------
531  override void OnMenuUpdate(float tDelta)
532  {
533  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
534  if (!mgr)
535  return;
536  int nCompleted, nTotal;
537  mgr.GetDownloadQueueState(nCompleted, nTotal);
538 
539  // Pause / Resume button label
540  bool paused = mgr.GetDownloadsPaused();
541  string pauseButtonLabel = "#AR-DownloadManager_ButtonPause";
542  if (paused)
543  pauseButtonLabel = "#AR-DownloadManager_ButtonResume";
544  m_PauseResumeButton.SetLabel(pauseButtonLabel);
545 
546  // Cancel button
547  m_CancelButton.SetEnabled(nTotal > 0);
548  }
549 
550  //------------------------------------------------------------------------------------------
551  protected void OnPauseResumeButton()
552  {
553  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
554 
555  if (!mgr)
556  return;
557 
558  bool paused = mgr.GetDownloadsPaused();
559  mgr.SetDownloadsPaused(!paused);
560  }
561 
562  //------------------------------------------------------------------------------------------
563  protected void OnCancelButton()
564  {
565  // todo: confirmation dialog
566 
567  SCR_DownloadManager mgr = SCR_DownloadManager.GetInstance();
568 
569  if (!mgr)
570  return;
571 
572  array<ref SCR_WorkshopItemActionDownload> actions = mgr.GetDownloadQueue();
573 
574  foreach (SCR_WorkshopItemActionDownload action : actions)
575  {
576  action.Cancel();
577  }
578  }
579 }
OnDownloadFailed
protected void OnDownloadFailed(SCR_WorkshopItemActionDownload action, int reason)
Definition: SCR_DownloadManager_Dialog.c:332
HISTORY
@ HISTORY
Definition: SCR_DownloadManager_Dialog.c:13
m_StorageLimitDialog
protected SCR_NotEnoughStorageDialog m_StorageLimitDialog
Definition: SCR_DownloadManager_Dialog.c:36
EDownloadManagerActionState
EDownloadManagerActionState
Enum describing current state of downloading action.
Definition: SCR_DownloadManager.c:846
CreateStoraLimitError
protected void CreateStoraLimitError()
Definition: SCR_DownloadManager_Dialog.c:405
STATE_ALL_PAUSE
const protected string STATE_ALL_PAUSE
Definition: SCR_DownloadManager_Dialog.c:20
SCR_DownloadManagerListComponent
Definition: SCR_DownloadManagerListComponent.c:5
STATE_DOWNLOADING
enum SCR_EDownloadManagerTabs STATE_DOWNLOADING
OnPauseButton
protected void OnPauseButton()
Definition: SCR_DownloadManager_Dialog.c:456
m_HistoryDownloads
protected ref SCR_DownloadManagerListComponent m_HistoryDownloads
Definition: SCR_DownloadManager_Dialog.c:41
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_CommonDialogs
Definition: CommonDialogs.c:5
SCR_WorkshopItemActionDownload
Definition: SCR_WorkshopItemActionDownload.c:9
OnDownloadFailDialogClose
protected void OnDownloadFailDialogClose()
Definition: SCR_DownloadManager_Dialog.c:420
OnStorageLimitDialogClosed
protected void OnStorageLimitDialogClosed()
Definition: SCR_DownloadManager_Dialog.c:413
SCR_WorkshopItem
Definition: SCR_WorkshopItem.c:21
STATE_NO_ACTIVE_DOWNLOADS
const protected string STATE_NO_ACTIVE_DOWNLOADS
Definition: SCR_DownloadManager_Dialog.c:21
GetRootWidget
Widget GetRootWidget()
Definition: SCR_UITaskManagerComponent.c:160
SCR_DownloadManagerEntry
Definition: SCR_DownloadManagerEntry.c:10
SCR_WorkshopSettings
Definition: SCR_WorkshopSettings.c:5
OnCancelButton
protected void OnCancelButton()
Definition: SCR_DownloadManager_Dialog.c:472
OnDownloadComplete
protected void OnDownloadComplete(SCR_WorkshopItemActionDownload action)
Definition: SCR_DownloadManager_Dialog.c:320
OnBackButton
protected void OnBackButton()
Definition: SCR_DownloadManager_Dialog.c:437
SCR_TabDialog
Definition: SCR_TabDialog.c:9
OnNewDownload
protected void OnNewDownload(SCR_WorkshopItem item, SCR_WorkshopItemActionDownload action)
Definition: SCR_DownloadManager_Dialog.c:290
UIColors
Definition: Constants.c:16
UpdateDownloadingSpeedWidget
protected void UpdateDownloadingSpeedWidget(bool display, bool showFallback)
Definition: SCR_DownloadManager_Dialog.c:211
GetSelectedAction
protected SCR_WorkshopItemActionDownload GetSelectedAction()
Definition: SCR_DownloadManager_Dialog.c:272
InitList
protected void InitList()
Definition: SCR_DownloadManager_Dialog.c:245
UpdateProgressWidgets
protected void UpdateProgressWidgets()
Definition: SCR_DownloadManager_Dialog.c:151
SCR_ByteFormat
Definition: SCR_ByteFormat.c:5
OnMenuUpdate
override void OnMenuUpdate(float tDelta)
Definition: SCR_DownloadManager_Dialog.c:107
SCR_EDownloadManagerTabs
SCR_EDownloadManagerTabs
Definition: SCR_DownloadManager_Dialog.c:10
m_fStorageLimitErrorSize
protected float m_fStorageLimitErrorSize
Definition: SCR_DownloadManager_Dialog.c:37
FAILED_ADDON_FORMAT
const protected string FAILED_ADDON_FORMAT
Definition: SCR_DownloadManager_Dialog.c:28
OnMenuOpen
override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)
Definition: SCR_DownloadManager_Dialog.c:61
SCR_DownloadManagerDialogWidgets
Definition: SCR_DownloadManagerDialogWidgets.c:4
OnPauseAllButton
protected void OnPauseAllButton()
Definition: SCR_DownloadManager_Dialog.c:444
DOWNLOAD_SUMMARY_FORMAT
const protected string DOWNLOAD_SUMMARY_FORMAT
Definition: SCR_DownloadManager_Dialog.c:25
SCR_ConfigurableDialogUiPreset
Configuration for a dialog.
Definition: SCR_ConfigurableDialogUI.c:809
OnMenuClose
override void OnMenuClose()
Definition: SCR_DownloadManager_Dialog.c:94
ACTIVE
@ ACTIVE
Definition: SCR_DownloadManager_Dialog.c:12
SCR_MessageDialogContent
Definition: SCR_MessageDialogContent.c:4
OnNewActionActivate
protected void OnNewActionActivate(SCR_WorkshopItemActionDownload action)
Definition: SCR_DownloadManager_Dialog.c:313
m_DownloadFailDialog
protected SCR_ConfigurableDialogUi m_DownloadFailDialog
Definition: SCR_DownloadManager_Dialog.c:34
OnDownloadCanceled
protected void OnDownloadCanceled(SCR_WorkshopItemActionDownload action)
Definition: SCR_DownloadManager_Dialog.c:428
OnFullStorageError
protected void OnFullStorageError(SCR_WorkshopItemActionDownload action, float size)
Call on full addons storage reached to display storage limit reached error.
Definition: SCR_DownloadManager_Dialog.c:387
SCR_DownloadManager_Dialog
void SCR_DownloadManager_Dialog()
Definition: SCR_DownloadManager_Dialog.c:491
SCR_ConfigurableDialogUi
Definition: SCR_ConfigurableDialogUI.c:13
m_Widgets
protected ref SCR_DownloadManagerDialogWidgets m_Widgets
Definition: SCR_DownloadManager_Dialog.c:31
FAILED_ADDON_LIST_DIALOG
const protected string FAILED_ADDON_LIST_DIALOG
Definition: SCR_DownloadManager_Dialog.c:29
m_DownloadFailDialogContent
protected SCR_MessageDialogContent m_DownloadFailDialogContent
Definition: SCR_DownloadManager_Dialog.c:35
SCR_DownloadManager_MiniDialog
Definition: SCR_DownloadManager_Dialog.c:507
DOWNLOAD_SUMMARY_COLORED_FORMAT
const protected string DOWNLOAD_SUMMARY_COLORED_FORMAT
Definition: SCR_DownloadManager_Dialog.c:26
SCR_WorkshopUiCommon
Definition: SCR_WorkshopUiCommon.c:5
SCR_NotEnoughStorageDialog
void SCR_NotEnoughStorageDialog(float sizeBytes)
Definition: CommonDialogs.c:228
SCR_DownloadManager
Definition: SCR_DownloadManager.c:20
FindButton
SCR_InputButtonComponent FindButton(string tag)
Returns a button with given tag.
Definition: SCR_BrowserHoverTooltipComponent.c:116
ShowFailedModsDialog
protected void ShowFailedModsDialog(SCR_WorkshopItemActionDownload action, int reason)
Definition: SCR_DownloadManager_Dialog.c:351
OnAutoenableButton
protected void OnAutoenableButton()
Definition: SCR_DownloadManager_Dialog.c:483
m_ActiveDownloads
protected ref SCR_DownloadManagerListComponent m_ActiveDownloads
Definition: SCR_DownloadManager_Dialog.c:40
~SCR_DownloadManager_Dialog
void ~SCR_DownloadManager_Dialog()
Definition: SCR_DownloadManager_Dialog.c:497
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1
DOWNLOAD_LINE_LAYOUT
const protected ResourceName DOWNLOAD_LINE_LAYOUT
Definition: SCR_DownloadManager_Dialog.c:24
STR_AFFECTED_MODS
const protected string STR_AFFECTED_MODS
Definition: SCR_DownloadManager_Dialog.c:22