60 if (!workshop || workshop.IsVerificationRunning())
75 if (newDevice != EInputDeviceType.MOUSE)
76 m_Widgets.m_RedownloadButtonComponent0.SetVisible(
false);
82 bool result = super.OnFocus(w, x, y);
95 bool result = super.OnFocusLost(w, x, y);
97 m_Widgets.m_RedownloadButtonComponent0.SetVisible(
false);
134 case SCR_EAddonValidateState.VALIDATING:
135 progress =
m_Item.GetWorkshopItem().GetVerificationProgress();
137 case SCR_EAddonValidateState.NEED_UPDATING:
138 case SCR_EAddonValidateState.IDLE:
141 case SCR_EAddonValidateState.REPAIRING:
142 case SCR_EAddonValidateState.DOWNLOADING:
143 case SCR_EAddonValidateState.UPDATING:
144 progress =
m_Item.GetWorkshopItem().GetProgress();
150 if (
m_eCurrentState == SCR_EAddonValidateState.DOWNLOADING && progress == 1.0)
155 else if (
m_eCurrentState == SCR_EAddonValidateState.UPDATING && progress == 1.0)
166 m_Widgets.m_ProgressComponent.SetSliderColor(currentState.GetColor());
167 m_Widgets.m_wDownloadStateText.SetColor(currentState.GetColor());
176 m_Widgets.m_ProgressComponent.StopProgressAnimation();
189 m_Widgets.m_LoadingOverlayComponent.SetShown(
true);
207 m_Widgets.m_LoadingOverlayComponent.SetShown(
false);
233 m_Widgets.m_wDownloadErrorText.SetText(
string.Empty);
257 m_Item.GetWorkshopItem().CancelVerification();
281 if (
m_Item.GetWorkshopItem().GetActiveRevision().IsCorrupted())
319 m_Widgets.m_wDownloadErrorText.SetText(
string.Empty);
341 m_Item.GetWorkshopItem().Cancel(null);
397 m_Widgets.m_wDownloadErrorText.SetText(
string.Empty);
493 m_Widgets.m_wDownloadErrorText.SetTextFormat(errorMsg, code);
567 if (!
m_Item.GetDetailsLoaded())
581 if (item.IsDownloadRunning())
583 else if (item.GetUpdateAvailable())
597 m_Widgets.m_wDownloadStateText.SetText(
string.Empty);
598 m_Widgets.m_ProgressComponent.SetValue(0,
false);
599 m_Widgets.m_ProgressComponent.SetAnimationTime(0.2);
600 m_Widgets.m_RedownloadButtonComponent0.SetVisible(
false);
631 super.HandlerDeattached(w);
635enum SCR_EAddonValidateError
643enum SCR_EAddonValidateState
663class SCR_AddonLineValidateError
665 [
Attribute(SCR_EAddonValidateError.UNKNOWN.ToString(), UIWidgets.ComboBox,
string.Empty,
string.Empty, enumType: SCR_EAddonValidateError)]
666 protected SCR_EAddonValidateError m_eId;
668 [
Attribute(
"", UIWidgets.EditBox,
"The Error message for the error id")]
672 SCR_EAddonValidateError GetErrorCode()
685class SCR_AddonLineValidateState
687 [
Attribute(SCR_EAddonValidateState.IDLE.ToString(), UIWidgets.ComboBox,
string.Empty,
string.Empty, enumType: SCR_EAddonValidateState)]
688 protected SCR_EAddonValidateState
m_eState;
690 [
Attribute(
"", UIWidgets.EditBox,
"Text to display while in this state")]
693 [
Attribute(UIColors.GetColorAttribute(Color.Black), UIWidgets.ColorPicker)]
716class SCR_AddonLineValidateStates
719 ref array<ref SCR_AddonLineValidateState> m_aStates;
722 ref array<ref SCR_AddonLineValidateError> m_aErrors;
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_AIGroupInfoComponentClass IDLE
Group has no waypoints and does not engage an enemy.
EAITargetClusterState m_eState
SCR_AddonLineValidateRepairComponent AVAILABLE_SPACE
SCR_AddonLineValidateRepairComponent INTERNET
Server list provided by Backend.
InputManager GetInputManager()
class SCR_WorkshopUiCommon DOWNLOADING
void Init(notnull SCR_WorkshopItem item, notnull map< SCR_EAddonValidateState, ref SCR_AddonLineValidateState > states, notnull map< int, string > errorMessages)
Setup line.
ref SCR_WorkshopItem m_Item
void SetErrorMessage(int code)
SCR_BackendImageComponent m_BackendImageComponent
void StopRepairing(bool skipUIUpdate=false)
ref BackendCallback m_Callback
bool HasFailedDownloading()
ScriptInvokerScriptedWidgetComponent GetOnRepairEnd()
ScriptInvokerScriptedWidgetComponent GetOnRepairStart()
ref ScriptInvokerScriptedWidgetComponent m_OnDownloadEnd
void UpdateAllWidgets()
Update visual state of line.
ref SCR_WorkshopDownloadSequence m_DownloadRequest
SCR_WorkshopItem GetWorkshopItem()
ref ScriptInvokerScriptedWidgetComponent m_OnDownloadStart
void OnRepairingSuccess()
ref ScriptInvokerScriptedWidgetComponent m_OnRepairEnd
ref ScriptInvokerScriptedWidgetComponent m_OnRepairStart
override void HandlerAttached(Widget w)
ref ScriptInvokerScriptedWidgetComponent m_OnValidateEnd
void OnWorkshopItemLoaded()
void StopContinuousUpdate(bool skipUIUpdate=false)
void OnClickAttemptResubscribing()
override bool OnFocus(Widget w, int x, int y)
void UpdateDownloadProgressBar()
bool StartCleanDownload()
ScriptInvokerScriptedWidgetComponent GetOnValidateEnd()
ref map< int, string > m_mErrorMessages
void OnInputDeviceChange(EInputDeviceType oldDevice, EInputDeviceType newDevice)
void OnDownloadStart(SCR_DownloadSequence sequence)
void OnDownloadFinished()
ref ScriptInvokerScriptedWidgetComponent m_OnValidateStart
void OnValidationSuccess()
bool m_bUpdatingContinuously
void OnDownloadError(SCR_DownloadSequence sequence)
SCR_EAddonValidateState m_eCurrentState
override bool OnFocusLost(Widget w, int x, int y)
void OnWorkshopItemChange()
void StopValidating(bool skipUIUpdate=false)
override void HandlerDeattached(Widget w)
ref SCR_ValidateRepairLineWidgets m_Widgets
void StartContinuousUpdate()
ref map< SCR_EAddonValidateState, ref SCR_AddonLineValidateState > m_mVisualStates
ScriptInvokerScriptedWidgetComponent GetOnValidateStart()
override void HandlerAttached(Widget w)
static SCR_WorkshopDownloadSequence Create(SCR_WorkshopItem item, Revision itemTargetRevision, SCR_WorkshopDownloadSequence previous)
Tries to create a new request if previous doesn't exist or finished. Otherwise returns the previous r...
@ FINISHED
Job was successfully finished.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute
proto external EParticleEffectState GetState()
EBackendError
Backend error.