Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_DownloadConfirmationDialog Interface Reference

Dialog for confirming multiple downloads in workshop. More...

Inheritance diagram for SCR_DownloadConfirmationDialog:
[legend]

Public Member Functions

override void OnMenuOpen (SCR_ConfigurableDialogUiPreset preset)
 Called last of all, after all the initialization of main element done.
 
void SetStyleDownloadAddonsWithDependencies ()
 This dialog can be used in a few contexts.
 
void SetStyleDownloadAddons ()
 Hides all explanation text.
 
override void OnConfirm ()
 
void OnConfirmAlternative ()
 This is only valid when we can download the main addon.
 
array< ref SCR_WorkshopItemActionGetActions ()
 Returns the internal array with created download actions.
 
- Public Member Functions inherited from SCR_ConfigurableDialogUi
Widget GetRootWidget ()
 
OverlayWidget GetDialogBaseOverlay ()
 Returns the base dialog overlay (the rectangle covered by the background). Useful for dialog wide darkening (e.g. by SCR_LoadingOverlay)
 
Widget GetContentLayoutRoot ()
 Returns the root of the content layout.
 
SCR_ConfigurableDialogUiPreset GetDialogPreset ()
 
void Close ()
 
void SetTitle (string text)
 
void SetMessage (string text)
 
void SetMessageColor (Color color)
 
TextWidget GetMessageWidget ()
 
string GetMessageStr ()
 
void SetTitleIcon (ResourceName image, string imageName)
 Set title icons with custom image.
 
void SetIconColor (Color color)
 Set title icons with custom image.
 
void SetStyle (EConfigurableDialogStyle type)
 Sets colors based on style.
 
void BindButtonConfirm (SCR_InputButtonComponent button)
 Allows to register a custom button to call OnConfirm (i.e. one not in the conf files but placed by hand in the layout)
 
void BindButtonCancel (SCR_InputButtonComponent button)
 Allows to register a custom button to call OnCancel (i.e. one not in the conf files but placed by hand in the layout)
 
void BindButtonGeneric (SCR_InputButtonComponent button, string tag=string.Empty)
 Allows to register a custom button to call OnButtonPressed (i.e. one not in the conf files but placed by hand in the layout). An empty tag will result in the widget's name being used instead.
 
SCR_InputButtonComponent FindButton (string tag)
 Returns a button with given tag.
 
string GetButtonTag (SCR_InputButtonComponent button)
 Returns a button's tag.
 
void OnMenuUpdate (float tDelta)
 
void OnMenuFocusGained ()
 
void OnMenuFocusLost ()
 
void OnMenuShow ()
 
void OnMenuHide ()
 
void OnMenuClose ()
 

Static Public Member Functions

static SCR_DownloadConfirmationDialog CreateForAddonAndDependencies (notnull SCR_WorkshopItem mainItem, bool downloadMainItem, notnull array< ref SCR_WorkshopItem > dependencies, bool subscribeToAddons)
 The created download action will be bound to one main item and its dependencies.
 
static SCR_DownloadConfirmationDialog CreateForAddons (notnull array< ref Tuple2< SCR_WorkshopItem, ref Revision > > addonsAndVersions, bool subscribeToAddons)
 Download addons with specific versions.
 
- Static Public Member Functions inherited from SCR_ConfigurableDialogUi
static SCR_ConfigurableDialogUi CreateFromPreset (ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj=null)
 Creates a dialog from preset.
 
static SCR_ConfigurableDialogUi GetCurrentDialog ()
 
static string GetCurrentDialogTag ()
 
static bool IsPresetValid (ResourceName presetsResourceName, string tag)
 

Protected Member Functions

void LoadAddonPatchSizes ()
 
void OnAllPatchSizeLoaded (SCR_AddonPatchSizeLoader loader, bool allLoaded)
 
void CreateAddonWidget (notnull SCR_WorkshopItem dep, Widget listRoot)
 Create and setup addon widget text and verions.
 
void CreateAddonList ()
 
- Protected Member Functions inherited from SCR_ConfigurableDialogUi
void OnConfirm ()
 
void OnCancel ()
 
void OnButtonPressed (SCR_InputButtonComponent button)
 
void OnMenuOpen (SCR_ConfigurableDialogUiPreset preset)
 Called last of all, after all the initialization of main element done.
 
void Init (Widget root, SCR_ConfigurableDialogUiPreset preset, MenuBase proxyMenu)
 
void InitWidgets ()
 
SCR_InputButtonComponent CreateButton (SCR_ConfigurableDialogUiButtonPreset buttonPreset)
 
void Internal_Close ()
 
void InitAttributedVariables ()
 Verifies that all attributed variables are set up.
 

Static Protected Member Functions

static void SetupDownloadDialogAddons (notnull out SCR_DownloadConfirmationDialog dialog, notnull array< ref Tuple2< SCR_WorkshopItem, ref Revision > > addonsAndVersions, bool subscribeToAddons)
 
- Static Protected Member Functions inherited from SCR_ConfigurableDialogUi
static SCR_ConfigurableDialogUi CreateByPreset (SCR_ConfigurableDialogUiPreset preset, SCR_ConfigurableDialogUi customDialogObj=null)
 
static Widget GetContentWidget (Widget baseWidget)
 Returns the container in which to place the content layout. Container must be called ContentLayoutContainer.
 

Protected Attributes

ref SCR_WorkshopItem m_Item
 
bool m_bDownloadMainItem
 
ref array< ref SCR_WorkshopItemm_aDependencies
 
ref array< ref Revision > m_aDependencyVersions
 
bool m_bSubscribeToAddons
 
ref SCR_DownloadConfirmationDialogContentWidgets m_Widgets = new SCR_DownloadConfirmationDialogContentWidgets()
 
ref array< ref SCR_WorkshopItemActionm_aCreatedActions = {}
 
ref SCR_AddonPatchSizeLoader m_Loader = new SCR_AddonPatchSizeLoader()
 
ref ScriptInvoker m_OnDownloadConfirmed
 
- Protected Attributes inherited from SCR_ConfigurableDialogUi
float m_fFadeInTime
 
ResourceName m_sNavigationButtonLayout
 
string m_sWidgetNameButtonsLeft
 
string m_sWidgetNameButtonsRight
 
string m_sWidgetNameButtonsCenter
 
ImageWidget m_wImgTopLine
 
ImageWidget m_wImgTitleIcon
 
TextWidget m_wTitle
 
TextWidget m_wMessage
 
VerticalLayoutWidget m_wContentVerticalLayout
 
ref map< string, SCR_InputButtonComponentm_aButtonComponents = new map<string, SCR_InputButtonComponent>
 
Widget m_wRoot
 
OverlayWidget m_wDialogBase
 
SCR_DynamicFooterComponent m_DynamicFooter
 
MenuBase m_ProxyMenu
 
ref SCR_ConfigurableDialogUiPreset m_DialogPreset
 
string m_sLastPressedButtonTag
 
bool m_bIsClosing
 

Static Protected Attributes

const ResourceName DOWNLOAD_LINE_LAYOUT = "{BB5AEDDA3C4134FD}UI/layouts/Menus/ContentBrowser/DownloadManager/DownloadManager_AddonDownloadLineConfirmation.layout"
 
- Static Protected Attributes inherited from SCR_ConfigurableDialogUi
static SCR_ConfigurableDialogUi m_CurrentDialog
 

Additional Inherited Members

- Public Attributes inherited from SCR_ConfigurableDialogUi
ref ScriptInvoker m_OnConfirm = new ScriptInvoker()
 
ref ScriptInvoker m_OnCancel = new ScriptInvoker()
 
ref ScriptInvoker m_OnClose = new ScriptInvoker()
 
ref ScriptInvoker m_OnCloseStart = new ScriptInvoker()
 
ref ScriptInvoker m_OnButtonPressed = new ScriptInvoker()
 
- Static Public Attributes inherited from SCR_ConfigurableDialogUi
static const ResourceName NAVIGATION_BUTTON_LAYOUT = "{87037226B1A2064B}UI/layouts/WidgetLibrary/Buttons/WLib_NavigationButtonSuperSmall.layout"
 
static const string BUTTON_CONFIRM = "confirm"
 
static const string BUTTON_CANCEL = "cancel"
 

Detailed Description

Dialog for confirming multiple downloads in workshop.

Member Function Documentation

◆ CreateAddonList()

void SCR_DownloadConfirmationDialog.CreateAddonList ( )
protected

◆ CreateAddonWidget()

void SCR_DownloadConfirmationDialog.CreateAddonWidget ( notnull SCR_WorkshopItem  dep,
Widget  listRoot 
)
protected

Create and setup addon widget text and verions.

Implemented in SCR_AddonUpdateConfirmationDialog.

◆ CreateForAddonAndDependencies()

static SCR_DownloadConfirmationDialog SCR_DownloadConfirmationDialog.CreateForAddonAndDependencies ( notnull SCR_WorkshopItem  mainItem,
bool  downloadMainItem,
notnull array< ref SCR_WorkshopItem dependencies,
bool  subscribeToAddons 
)
static

The created download action will be bound to one main item and its dependencies.

mainItem - the main addon for which the dialog is created. downloadMainItem - when true, main item will be considered for download. dependencies -array with dependencies. Cannot be null, but can be empty.

◆ CreateForAddons()

static SCR_DownloadConfirmationDialog SCR_DownloadConfirmationDialog.CreateForAddons ( notnull array< ref Tuple2< SCR_WorkshopItem, ref Revision > >  addonsAndVersions,
bool  subscribeToAddons 
)
static

Download addons with specific versions.

◆ GetActions()

array< ref SCR_WorkshopItemAction > SCR_DownloadConfirmationDialog.GetActions ( )

Returns the internal array with created download actions.

◆ LoadAddonPatchSizes()

void SCR_DownloadConfirmationDialog.LoadAddonPatchSizes ( )
protected

◆ OnAllPatchSizeLoaded()

void SCR_DownloadConfirmationDialog.OnAllPatchSizeLoaded ( SCR_AddonPatchSizeLoader  loader,
bool  allLoaded 
)
protected

◆ OnConfirm()

override void SCR_DownloadConfirmationDialog.OnConfirm ( )

◆ OnConfirmAlternative()

void SCR_DownloadConfirmationDialog.OnConfirmAlternative ( )

This is only valid when we can download the main addon.

◆ OnMenuOpen()

override void SCR_DownloadConfirmationDialog.OnMenuOpen ( SCR_ConfigurableDialogUiPreset  preset)

Called last of all, after all the initialization of main element done.

Here you can perform custom initialization.

Implements SCR_ConfigurableDialogUi.

Implemented in SCR_DownloadFailDialog.

◆ SetStyleDownloadAddons()

void SCR_DownloadConfirmationDialog.SetStyleDownloadAddons ( )

Hides all explanation text.

◆ SetStyleDownloadAddonsWithDependencies()

void SCR_DownloadConfirmationDialog.SetStyleDownloadAddonsWithDependencies ( )

This dialog can be used in a few contexts.

These SetStyle methods set up the widgets according to specific use cases. Sets text: "%1 dependencies will be downloaded:" over the dependencies list

◆ SetupDownloadDialogAddons()

static void SCR_DownloadConfirmationDialog.SetupDownloadDialogAddons ( notnull out SCR_DownloadConfirmationDialog  dialog,
notnull array< ref Tuple2< SCR_WorkshopItem, ref Revision > >  addonsAndVersions,
bool  subscribeToAddons 
)
staticprotected

Member Data Documentation

◆ DOWNLOAD_LINE_LAYOUT

const ResourceName SCR_DownloadConfirmationDialog.DOWNLOAD_LINE_LAYOUT = "{BB5AEDDA3C4134FD}UI/layouts/Menus/ContentBrowser/DownloadManager/DownloadManager_AddonDownloadLineConfirmation.layout"
staticprotected

◆ m_aCreatedActions

ref array<ref SCR_WorkshopItemAction> SCR_DownloadConfirmationDialog.m_aCreatedActions = {}
protected

◆ m_aDependencies

ref array<ref SCR_WorkshopItem> SCR_DownloadConfirmationDialog.m_aDependencies
protected

◆ m_aDependencyVersions

ref array<ref Revision> SCR_DownloadConfirmationDialog.m_aDependencyVersions
protected

◆ m_bDownloadMainItem

bool SCR_DownloadConfirmationDialog.m_bDownloadMainItem
protected

◆ m_bSubscribeToAddons

bool SCR_DownloadConfirmationDialog.m_bSubscribeToAddons
protected

◆ m_Item

ref SCR_WorkshopItem SCR_DownloadConfirmationDialog.m_Item
protected

◆ m_Loader

ref SCR_AddonPatchSizeLoader SCR_DownloadConfirmationDialog.m_Loader = new SCR_AddonPatchSizeLoader()
protected

◆ m_OnDownloadConfirmed

ref ScriptInvoker SCR_DownloadConfirmationDialog.m_OnDownloadConfirmed
protected

◆ m_Widgets

ref SCR_DownloadConfirmationDialogContentWidgets SCR_DownloadConfirmationDialog.m_Widgets = new SCR_DownloadConfirmationDialogContentWidgets()
protected

The documentation for this interface was generated from the following file: