Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CancelDownloadConfirmationDialog.c
Go to the documentation of this file.
1
3{
4 ref array<ref SCR_WorkshopItemActionDownload> m_aActions;
5
6 protected const ResourceName DOWNLOAD_LINE_LAYOUT = "{1C5D2CC10D7A1BC3}UI/layouts/Menus/ContentBrowser/DownloadManager/DownloadManager_AddonDownloadLineNonInteractive.layout";
7
8 //------------------------------------------------------------------------------------------------
9 void SCR_CancelDownloadConfirmationDialog(array<ref SCR_WorkshopItemActionDownload> actionsToCancel)
10 {
11 m_aActions = actionsToCancel;
12 SCR_ConfigurableDialogUi.CreateFromPreset(SCR_WorkshopDialogs.DIALOGS_CONFIG, "cancel_download_confirmation", this);
13 }
14
15 //------------------------------------------------------------------------------------------------
17 {
19
20 // Create widgets for downloads
21 foreach (SCR_WorkshopItemActionDownload action : m_aActions)
22 {
23 Widget w = GetGame().GetWorkspace().CreateWidgets(DOWNLOAD_LINE_LAYOUT, layout);
25 comp.InitForCancelDownloadAction(action);
26 }
27
28 super.OnMenuOpen(preset);
29 }
30
31 //------------------------------------------------------------------------------------------------
32 override void OnConfirm()
33 {
34 foreach (SCR_WorkshopItemActionDownload action : m_aActions)
35 {
36 action.Cancel();
37 }
38
39 super.OnConfirm();
40 }
41}
ArmaReforgerScripted GetGame()
Definition game.c:1398
UI layouts Menus CleanSweep CleanSweepAreaSelection layout
void SCR_CancelDownloadConfirmationDialog(array< ref SCR_WorkshopItemActionDownload > actionsToCancel)
override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)
static SCR_ConfigurableDialogUi CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj=null)
Creates a dialog from preset.
Widget GetContentLayoutRoot()
Returns the root of the content layout.
void InitForCancelDownloadAction(SCR_WorkshopItemActionDownload action)
Initializes the line in non-interactive mode, shows basic data about a download which is already runn...