17 [
Attribute(
"SubAttributeIndicator",
desc:
"Shown when attribute is a subattribute")]
20 [
Attribute(
"0.25",
desc:
"Subattribute indicator disabled alpha")]
100 discription.InitDynamicDescription(m_Attribute,
this);
105 ShowAttributeDescription();
117 m_Attribute = attribute;
118 m_AttributeManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
120 if (m_Attribute.GetOnExternalnChange())
121 m_Attribute.GetOnExternalnChange().Insert(SetFromVarExternal);
122 m_Attribute.GetOnVarChanged().Insert(
SetFromVar);
156 if (uiComponentWidget)
177 typename linkedOverrideAttributeType =
typename.Empty;
202 array<ref SCR_BaseEditorAttributeEntry> entries =
new array<ref SCR_BaseEditorAttributeEntry>;
205 foreach (SCR_BaseEditorAttributeEntry entry: entries)
244 child.AddHandler(eventHandler);
265 Print(
"SCR_BaseEditorAttributeUIComponent is lacking subattribute indicator and can never be shown as a subattribute",
LogLevel.WARNING);
291 m_Attribute.UpdateInterlinkedVariables(m_Attribute.GetVariable(),
m_AttributeManager);
295 ShowAttributeDescription();
321 if (discription.IsValid(m_Attribute,
this))
352 Print(
"SCR_BaseEditorAttributeUIComponent 'dynamicDescription' is missing UIInfo this means a dynamic description was added but the UIInfo was not set!",
LogLevel.WARNING);
357 string descr = uiInfo.GetDescription();
361 Print(
"'SCR_BaseEditorAttributeUIComponent' dynamicDescription does not have a description assigned! This means the description is not set!",
LogLevel.WARNING);
386 if (showButtonDescription)
391 if (buttonDescription.IsEmpty())
399 ShowAttributeDescription();
481 if (m_Attribute.GetCopyVariable())
546 ShowAttributeDescription();
557 ShowAttributeDescription();
596 ShowAttributeDescription();
ArmaReforgerScripted GetGame()
InputManager GetInputManager()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Using a controller will show/hide the Select button hint if the attribute with this script is focused...
void ToggleTickbox(bool toggled)
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
void SetInitCalled(bool initCalled)
sealed bool GetConflictingAttributeWasReset()
bool GetHasConflictingValues()
sealed bool SetVariable(SCR_BaseEditorAttributeVar var)
sealed ScriptInvoker GetOnVarChanged()
sealed void CreateCopyVariable()
sealed ScriptInvoker GetOnToggleEnable()
sealed SCR_BaseEditorAttributeVar GetVariableOrCopy()
sealed void ClearCopyVar()
Set copy var null.
sealed ScriptInvoker GetOnExternalnChange()
sealed void ClearVar()
Set var null.
sealed void SetConflictingAttributeWasReset(bool wasReset)
sealed ScriptInvoker GetOnToggleButtonSelected()
int GetEntries(notnull array< ref SCR_BaseEditorAttributeEntry > outEntries)
void SetIsOverridingValues(bool isOverridingValues)
bool GetIsOverridingValues()
SCR_EditorAttributeUIInfo GetUIInfo()
sealed ScriptInvoker GetOnSetAsSubAttribute()
void OnTickboxToggleChanged(bool toggle)
Get attribute this component represents return Editor attribute *SCR_BaseEditorAttribute GetAttribute()
SCR_ChangeableComponentBase m_UIComponent
bool m_bIsShowingDescription
array< SCR_BaseAttributeDynamicDescription > dynamicDescriptionArray
SCR_AttributeTickboxUIComponent m_TickBoxAttribute
ScriptInvoker GetOnAttributeUIFocusChanged()
Widget m_wAttributeHolder
SCR_AttributeButtonUIComponent m_ActiveButtonDescription
void ToggleEnable(bool enabled)
void SetFromVarOrDefault()
string m_sSubAttributeIndicatorName
Called on attribute changed via UI return Event_OnAttributeChanged ScriptInvoker *ScriptInvoker GetOnAttributeChanged()
void HideAttributeDescription()
ref SCR_EditorAttributeUIInfo m_ButtonDescriptionUIInfo
bool m_bShowButtonDescription
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
InputManager m_InputManager
void ShowButtonDescription(SCR_AttributeButtonUIComponent button, bool showButtonDescription, string buttonDescription=string.Empty)
string m_sButtonDescriptionParam1
Widget m_SubAttributeIndicator
void OnFocusAttributeWidget(Widget w)
Callback for focus of widget used.
ref ScriptInvoker Event_OnEnabledByAttribute
void ToggleEnableAttributeTickbox()
void ToggleButtonSelected(bool selected, int index, bool animated=true)
string m_sAttributeHolder
string m_sGamePadLockedSelectorName
ScriptInvoker GetOnMouseLeave()
ref ScriptInvoker Event_OnMouseLeave
override bool OnFocusLost(Widget w, int x, int y)
ref ScriptInvoker Event_OnAttributeUIFocusChanged
SCR_AttributesManagerEditorComponent m_AttributeManager
ref ScriptInvoker Event_OnAttributeChanged
void GamePadLockedSelectorFocusChanged(bool newFocus)
void SetVariableToDefaultValue(SCR_BaseEditorAttributeVar var)
void ToggleEnableAttribute(bool enabled)
override bool OnMouseEnter(Widget w, int x, int y)
string m_sUiComponentName
Widget m_GamePadLockedSelector
string m_sTickBoxAttributeName
void SetGamepadLockSelectorActive(bool isGamepad)
void SetFromVar(SCR_BaseEditorAttributeVar var)
string m_sButtonDescription
float m_fSubAttributeDisabledAlphaColor
bool OnChangeInternal(Widget w, int x, int y, bool finished)
bool m_bEnabledByAttribute
ref ScriptInvoker Event_OnInputDeviceChanged
Initialize GUI from attribute To be overridden by inherited classes param w Widget this component is attached to param attribute Editor attribute this component represents *void Init(Widget w, SCR_BaseEditorAttribute attribute)
override bool OnFocus(Widget w, int x, int y)
SCR_BaseButtonAttributeDynamicDescription buttonDynamicDescription
void AttributeValueChanged()
ScriptInvoker GetOnEnabledByAttribute()
SCR_BaseAttributeDynamicDescription dynamicDescription
Base class for all widgets that can change their internal state as editbox or spinbox.
void GetToggleStateAndTypename(out bool overrideToggleState, out typename linkedOverrideAttributeType)
UIInfo used by editor attribute system.
ScriptInvoker GetOnFocus()
ScriptInvoker GetOnFocusChanged()
static bool IsEmptyOrWhiteSpace(string input)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute