59 super.OnMenuOpen(preset);
62 BaseContainer container = rsc.GetResource().ToBaseContainer();
63 SCR_AddonLineValidateStates statesConfig = SCR_AddonLineValidateStates.Cast(
BaseContainerTools.CreateInstanceFromContainer(container));
68 foreach (SCR_AddonLineValidateState state : statesConfig.m_aStates)
75 foreach (SCR_AddonLineValidateError errorType : statesConfig.m_aErrors)
93 if (!scroll || !vLayout)
96 Widget childWidget = vLayout.GetChildren();
99 vLayout.RemoveChild(childWidget);
100 childWidget = vLayout.GetChildren();
109 super.Init(root, preset, proxyMenu);
157 protected void InitList(
bool loadEnabledMods =
true)
159 array<WorkshopItem> rawWorkshopItems = {};
160 GetGame().GetBackendApi().GetWorkshop().GetOfflineItems(rawWorkshopItems);
163 array<SCR_WorkshopItem> itemsRegistered = {};
174 if (itemRegistered.
GetEnabled() != loadEnabledMods)
178 if (!itemRev.IsDownloaded())
182 itemsRegistered.Insert(itemRegistered);
186 SCR_Sorting<SCR_WorkshopItem, SCR_CompareWorkshopItemName>.HeapSort(itemsRegistered);
189 array<ref SCR_WorkshopItem> itemsSorted = {};
192 itemsSorted.Insert(i);
206 if (!scroll || !vLayout)
210 float scrollx, scrolly;
211 scroll.GetSliderPos(scrollx, scrolly);
233 scroll.SetSliderPos(scrollx, scrolly);
311 if (addonComponent.HasFailed())
321 if (addonComponent.HasFailed())
331 if (addonComponent.HasFailed())
ArmaReforgerScripted GetGame()
Object holding reference to resource. In destructor release the resource.
void Init(notnull SCR_WorkshopItem item, notnull map< SCR_EAddonValidateState, ref SCR_AddonLineValidateState > states, notnull map< int, string > errorMessages)
Setup line.
ScriptInvokerScriptedWidgetComponent GetOnRepairEnd()
ScriptInvokerScriptedWidgetComponent GetOnRepairStart()
ScriptInvokerScriptedWidgetComponent GetOnValidateEnd()
ScriptInvokerScriptedWidgetComponent GetOnValidateStart()
SCR_WorkshopItem Register(WorkshopItem item)
Returns a SCR_WorkshopItem. If it's not registered, creates a new one and registers it.
static SCR_AddonManager GetInstance()
ref map< string, SCR_InputButtonComponent > m_aButtonComponents
SCR_InputButtonComponent FindButton(string tag)
Returns a button with given tag.
Configuration for a dialog.
TextWidget m_wGlobalStatusText
bool m_bValidationStarting
bool HasRunningValidation()
SCR_InputButtonComponent m_ButtonValidate
void OnAddonDownloaded(notnull SCR_AddonLineValidateRepairComponent addonComponent)
const ResourceName DOWNLOAD_LINE_LAYOUT
void OnAddonStartDownloading(notnull SCR_AddonLineValidateRepairComponent addonComponent)
int m_iFailedValidationCount
const string TEXT_ERROR_FORMAT
const string BUTTON_VALIDATE
void OnFocusAddon(notnull SCR_AddonLineValidateRepairComponent addonComponent)
const string BUTTON_REDOWNLOAD
void BindButtonValidate(notnull SCR_InputButtonComponent button)
void OnFocusLostAddon(notnull SCR_AddonLineValidateRepairComponent addonComponent)
void CreateList(array< ref SCR_WorkshopItem > items)
void InitList(bool loadEnabledMods=true)
SCR_InputButtonComponent m_ButtonRedownload
void DelayedDownloadButtonVisibility()
void Init(Widget root, SCR_ConfigurableDialogUiPreset preset, MenuBase proxyMenu)
ref map< SCR_EAddonValidateState, ref SCR_AddonLineValidateState > m_mCachedAddonStates
Holds all the different cached id with the enum as key.
ref map< int, string > m_mCachedAddonErrors
void OnAddonStartRepairing(notnull SCR_AddonLineValidateRepairComponent addonComponent)
override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)
const ResourceName ADDON_VISUALS_CONFIG
void OnAddonRepaired(notnull SCR_AddonLineValidateRepairComponent addonComponent)
ref array< SCR_AddonLineValidateRepairComponent > m_aEntriesDownloading
bool HasRunningDownload()
void LoadAddons(bool enabledAddons)
ref map< SCR_AddonLineValidateRepairComponent, SCR_WorkshopItem > m_mEntriesComponents
void OnValidateAllButton()
void LoadAddon(notnull SCR_WorkshopItem item)
override void OnMenuClose()
SCR_AddonLineValidateRepairComponent m_FocusedAddon
ref array< SCR_AddonLineValidateRepairComponent > m_aEntriesValidating
const string WIDGET_SCROLL_NAME
void OnAddonValidated(notnull SCR_AddonLineValidateRepairComponent addonComponent)
void BindButtonRedownload(notnull SCR_InputButtonComponent button)
const string WIDGET_VERTICAL_NAME
const string WIDGET_STATUS_TEXT_NAME
void OnReDownloadSelectedAddon()
void OnAddonStartValidating(notnull SCR_AddonLineValidateRepairComponent addonComponent)
const string TEXT_VALIDATED_FORMAT
const string TEXT_VALIDATING_FORMAT
ref array< SCR_AddonLineValidateRepairComponent > m_aEntriesRepairing
Revision GetCurrentLocalRevision()
Returns the revision which we currently have on the local storage.