62 super.HandlerAttached(w);
68 super.HandlerDeattached(w);
85 bool result = super.OnFocus(w, x, y);
94 bool result = super.OnFocusLost(w, x, y);
103 super.UpdateModularButtons();
111 super.OnTooltipShow(tooltip);
113 if (tooltip.
IsValid(
"IncompatibleAddonVersion",
m_Widgets.m_wIncompatibleButton))
146 string imageType =
"modIcon";
148 imageType =
"save-published";
166 m_Widgets.m_DeleteButtonComponent0.SetVisible(
169 availability != SCR_ERevisionAvailability.ERA_DOWNLOAD_NOT_FINISHED &&
178 Revision itemRevision = item.GetActiveRevision();
179 m_Widgets.m_RepairButtonComponent0.SetVisible(itemRevision.IsCorrupted());
221 m_Widgets.m_wLeftSeparator.SetVisible(!addonEnabled || forceHidden);
222 m_Widgets.m_wSizeMoveRight.SetVisible(!addonEnabled && !forceHidden);
223 m_Widgets.m_MoveRightButtonComponent0.SetVisible(!addonEnabled &&
m_bFocused && !forceHidden);
226 m_Widgets.m_wRightSeparator.SetVisible(addonEnabled || forceHidden);
227 m_Widgets.m_wSizeMoveLeft.SetVisible(addonEnabled || forceHidden);
228 m_Widgets.m_MoveLeftButtonComponent0.SetVisible(addonEnabled &&
m_bFocused && !forceHidden);
239 bool showIncompatibility = availability != SCR_ERevisionAvailability.ERA_AVAILABLE &&
240 availability != SCR_ERevisionAvailability.ERA_UNKNOWN_AVAILABILITY;
242 m_Widgets.m_IncompatibleButtonComponent0.SetVisible(showIncompatibility);
244 if (showIncompatibility)
247 if (!texture.IsEmpty())
248 m_Widgets.m_IncompatibleButtonComponent1.SetImage(texture);
254 m_Widgets.m_UpdateButtonComponent0.SetVisible(isDownloading ||
m_Item.GetUpdateAvailable());
264 m_Widgets.m_UpdateButtonComponent1.SetImage(texture);
268 m_Widgets.m_UpdateButtonComponent0.InvokeAllEnabledEffects(
true);
276 if (!
m_Widgets.m_wHorizontalState.IsVisible())
299 bool downloadIssue = availability == SCR_ERevisionAvailability.ERA_DOWNLOAD_NOT_FINISHED;
308 if (availability != SCR_ERevisionAvailability.ERA_AVAILABLE && !downloadIssue)
324 array<ref SCR_WorkshopItem> dependencies =
m_Item.GetLatestDependencies();
326 if (!dependencies.IsEmpty())
329 return !dependencies.IsEmpty();
505 if (!
m_Item.GetDetailsLoaded())
569enum SCR_EAddonLineErrorFlags
574 DOWNLOAD_ISSUES = 1 << 3
class RestAPIHelper< JsonApiStruct T > content
ArmaReforgerScripted GetGame()
SCR_AddonLineBaseComponent ITEM_ISSUES
SCR_AddonLineBaseComponent MISSING_DEPENDENCIES
Current revision is missing some dependencies and will not be allowed to be used (ENABLED and LOADED)...
SCR_AddonLineBaseComponent REVISION_AVAILABILITY_ISSUE
InputManager GetInputManager()
void OnSideTooltipShow(SCR_ScriptedWidgetTooltip tooltip)
override void HandlerDeattached(Widget w)
override bool OnFocus(Widget w, int x, int y)
SCR_WorkshopItem GetWorkshopItem()
ref SCR_WorkshopDownloadSequence m_DownloadRequest
void HandleDownloadChanges()
override void UpdateModularButtons()
override bool OnFocusLost(Widget w, int x, int y)
void OnAnyNewDownload(SCR_WorkshopItem item, SCR_WorkshopItemActionDownload action)
void OnAnyDownloadCompleted(SCR_WorkshopItemActionDownload action)
void StartContinuousUpdate()
void OnWorkshopItemChange()
void UpdateAllWidgets()
Update vizual state of line.
ScriptInvokerScriptedWidgetComponent GetOnEnableButton()
void OnDependenciesTooltipShow(SCR_ScriptedWidgetTooltip tooltip)
ScriptInvokerScriptedWidgetComponent GetOnDisableButton()
void OnUpdateTooltipShow(SCR_ScriptedWidgetTooltip tooltip)
ref SCR_AddonLineBaseWidgets m_Widgets
bool RequiresDownloadingDependencies()
void OnAnyDownloadError(SCR_WorkshopItemActionDownload action, int reason)
SCR_ButtonEffectColor m_UpdateButtonIconColor
override void OnTooltipShow(SCR_ScriptedWidgetTooltip tooltip)
override void HandlerAttached(Widget w)
void Init(SCR_WorkshopItem item)
Setup line.
void HandleEnableButtons(bool addonEnabled, bool forceHidden=false)
ref ScriptInvokerScriptedWidgetComponent m_OnFixButton
void StopContinuousUpdate()
SCR_EAddonLineErrorFlags GetErrorFlags()
ref ScriptInvokerScriptedWidgetComponent m_OnDisableButton
ref ScriptInvokerScriptedWidgetComponent m_OnEnableButton
SCR_EAddonLineErrorFlags m_eAddonLineErrorFlags
void UpdateDownloadProgressWidgets()
void UpdateCompatibilityWidgets()
ref SCR_WorkshopItem m_Item
void OnIncompatibleTooltipShow(SCR_ScriptedWidgetTooltip tooltip)
ScriptInvokerScriptedWidgetComponent GetOnFixButton()
void OnOpenDetailsButton()
bool m_bUpdatingContinuously
static SCR_ERevisionAvailability ItemAvailability(notnull WorkshopItem item)
static array< ref SCR_WorkshopItem > SelectItemsOr(array< ref SCR_WorkshopItem > items, EWorkshopItemQuery query)
ref ScriptInvokerBase< ScriptInvoker_DownloadManagerActionError > m_OnDownloadFailed
static SCR_DownloadManager GetInstance()
ref ScriptInvoker m_OnNewDownload
ref ScriptInvokerBase< ScriptInvoker_DownloadManagerAction > m_OnDownloadComplete
static float GetItemDownloadActionsProgress(SCR_WorkshopItem item)
Returns overall download progress for all actions of a workshop item.
ref ScriptInvokerBase< ScriptInvoker_DownloadManagerAction > m_OnDownloadCanceled
static string GetRevisionAvailabilityErrorMessage(WorkshopItem item)
static string GetRevisionAvailabilityErrorTexture(WorkshopItem item)
static void ExecutePrimaryAction(notnull SCR_WorkshopItem item, out SCR_WorkshopDownloadSequence dlRequest, Revision revision=null)
static bool IsDownloadingAddon(SCR_WorkshopItem item)
static void OnDeleteAddonButton(SCR_WorkshopItem item)
Shows a confirmation dialog when unsubscribing an addon.
static int GetDownloadProgressPercentage(float progress)
static bool IsDownloadingAddonOrDependencies(SCR_WorkshopItem item)