Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ModularButtonComponent.c File Reference

Go to the source code of this file.

Enumerations

enum  EModularButtonState
 

Functions

enum EModularButtonState Attribute ()] protected ref array< ref SCR_ButtonEffectBase > m_aEffects
 Post-process effect of scripted camera. More...
 
void SetEnabled (bool enabled)
 
bool GetEnabled ()
 
void SetToggled (bool toggled, bool invokeOnToggled=true)
 
bool GetToggled ()
 
bool GetFocused ()
 
bool GetMouseOver ()
 
void SetToggleable (bool toggleable)
 
void SetTogglableOnlyThroughApi (bool newValue)
 
void SetData (Managed data)
 
Managed GetData ()
 
Widget GetRootWidget ()
 
bool SetVisible (bool visible)
 
SCR_ButtonEffectBase FindEffect (string tag)
 
array< SCR_ButtonEffectBase > FindAllEffects (string tag)
 
array< SCR_ButtonEffectBase > GetAllEffects ()
 
void SetEffectsEnabled (string tag, bool enable)
 
void SetEffectsWithAnyTagEnabled (notnull array< string > tags)
 
void SetAllEffectsEnabled (bool enable)
 
void InvokeAllEnabledEffects (bool instant)
 
protected void UpdateCurrentState ()
 Checks current state, invokes state change effects if state has changed. More...
 
protected EModularButtonState GetCurrentState ()
 
protected void InvokeEffectsEvent (EModularButtonEventFlag eventFlag, bool instant=false)
 
void Internal_OnMasterButtonEvent (EModularButtonEventFlag eventFlag, bool instant)
 
protected void Internal_SetToggled (bool newToggled, bool invokeOnToggled=true)
 
void Internal_OnEffectEnabled (SCR_ButtonEffectBase effect)
 
override void HandlerAttached (Widget w)
 
override bool OnClick (Widget w, int x, int y, int button)
 
override bool OnDoubleClick (Widget w, int x, int y, int button)
 
override bool OnMouseEnter (Widget w, int x, int y)
 
override bool OnMouseLeave (Widget w, Widget enterW, int x, int y)
 
override bool OnFocus (Widget w, int x, int y)
 
override bool OnFocusLost (Widget w, int x, int y)
 
void _print (string s)
 
bool GetIsFocusOnMouseEnter ()
 
void SetIsFocusOnMouseEnter (bool focus)
 
string GetCurrentStateName ()
 

Variables

enum EModularButtonState CLICK = 1 << 0
 Enum corresponding Enfusion native event types. More...
 
enum EModularButtonState DOUBLE_CLICK = 1 << 1
 
enum EModularButtonState FOCUS_GAINED = 1 << 2
 
enum EModularButtonState FOCUS_LOST = 1 << 3
 
enum EModularButtonState MOUSE_ENTER = 1 << 4
 
enum EModularButtonState MOUSE_LEAVE = 1 << 5
 
 STATE_DEFAULT = 1 << 0
 Default state. More...
 
 STATE_HOVERED = 1 << 1
 Hovered. More...
 
 STATE_ACTIVATED = 1 << 2
 Activated. More...
 
 STATE_ACTIVATED_HOVERED = 1 << 3
 Activated and hovered. More...
 
 STATE_DISABLED = 1 << 4
 Disabled. More...
 
 STATE_DISABLED_ACTIVATED = 1 << 5
 Disabled and activated. More...
 
protected bool m_bCanBeToggled
 
protected bool m_bToggledOnlyThroughApi
 
protected bool m_bToggledAtStart
 
protected EModularButtonEventHandler m_eEventReturnValue
 
protected bool m_bFocusOnMouseEnter
 
protected bool m_bIgnoreStandardInputs
 
ref ScriptInvoker m_OnClicked = new ScriptInvoker()
 
ref ScriptInvoker m_OnDoubleClicked = new ScriptInvoker()
 
ref ScriptInvoker m_OnToggled = new ScriptInvoker()
 
ref ScriptInvoker m_OnFocus = new ScriptInvoker()
 
ref ScriptInvoker m_OnFocusLost = new ScriptInvoker()
 
ref ScriptInvoker m_OnMouseEnter = new ScriptInvoker()
 
ref ScriptInvoker m_OnMouseLeave = new ScriptInvoker()
 
protected Widget m_wRoot
 
protected bool m_bFocus
 
protected bool m_bMouseOver
 
protected bool m_bToggled
 
protected EModularButtonState m_eState
 
protected ref Managed m_UserData
 

Enumeration Type Documentation

◆ EModularButtonState

These enum values correspond to change of button state, A button can only be in one state at a time

Definition at line 6 of file SCR_ModularButtonComponent.c.

Function Documentation

◆ _print()

void _print ( string  s)
Parameters
[in]s

Definition at line 665 of file SCR_ModularButtonComponent.c.

◆ FindAllEffects()

array<SCR_ButtonEffectBase> FindAllEffects ( string  tag)
Parameters
[in]tag
Returns
all effects with given tag

Definition at line 214 of file SCR_ModularButtonComponent.c.

◆ FindEffect()

SCR_ButtonEffectBase FindEffect ( string  tag)

Returns first effect with given tag

Parameters
[in]tag
Returns

Definition at line 200 of file SCR_ModularButtonComponent.c.

◆ GetAllEffects()

array<SCR_ButtonEffectBase> GetAllEffects ( )
Returns
all effects

Definition at line 228 of file SCR_ModularButtonComponent.c.

◆ GetCurrentState()

protected EModularButtonState GetCurrentState ( )
Returns
Enum with current state value

Definition at line 334 of file SCR_ModularButtonComponent.c.

◆ GetCurrentStateName()

string GetCurrentStateName ( )
Returns

Definition at line 686 of file SCR_ModularButtonComponent.c.

◆ GetData()

Managed GetData ( )
Returns

Definition at line 171 of file SCR_ModularButtonComponent.c.

◆ GetEnabled()

bool GetEnabled ( )
Returns

Definition at line 107 of file SCR_ModularButtonComponent.c.

◆ GetFocused()

bool GetFocused ( )
Returns

Definition at line 136 of file SCR_ModularButtonComponent.c.

◆ GetIsFocusOnMouseEnter()

bool GetIsFocusOnMouseEnter ( )
Returns

Definition at line 672 of file SCR_ModularButtonComponent.c.

◆ GetMouseOver()

bool GetMouseOver ( )
Returns

Definition at line 143 of file SCR_ModularButtonComponent.c.

◆ GetRootWidget()

Widget GetRootWidget ( )
Returns

Definition at line 178 of file SCR_ModularButtonComponent.c.

◆ GetToggled()

bool GetToggled ( )
Returns

Definition at line 129 of file SCR_ModularButtonComponent.c.

◆ HandlerAttached()

override void HandlerAttached ( Widget  w)

Definition at line 459 of file SCR_ModularButtonComponent.c.

◆ Internal_OnEffectEnabled()

void Internal_OnEffectEnabled ( SCR_ButtonEffectBase  effect)

Must only be called by the effect class

Parameters
[in]effect

Definition at line 436 of file SCR_ModularButtonComponent.c.

◆ Internal_OnMasterButtonEvent()

void Internal_OnMasterButtonEvent ( EModularButtonEventFlag  eventFlag,
bool  instant 
)

Used for passing events from master button / slave button This is called on a slave button by SCR_ButtonEffectSlaveButton

Parameters
[in]eventFlag
[in]instant

Definition at line 408 of file SCR_ModularButtonComponent.c.

◆ Internal_SetToggled()

protected void Internal_SetToggled ( bool  newToggled,
bool  invokeOnToggled = true 
)

Definition at line 414 of file SCR_ModularButtonComponent.c.

◆ InvokeAllEnabledEffects()

void InvokeAllEnabledEffects ( bool  instant)

Applies all enabled effects.

Parameters
[in]instant

Definition at line 295 of file SCR_ModularButtonComponent.c.

◆ InvokeEffectsEvent()

protected void InvokeEffectsEvent ( EModularButtonEventFlag  eventFlag,
bool  instant = false 
)

Calls _OnEvent of all enabled effects.

Parameters
[in]eventFlag
[in]instant

Definition at line 388 of file SCR_ModularButtonComponent.c.

◆ OnClick()

override bool OnClick ( Widget  w,
int  x,
int  y,
int  button 
)

Definition at line 527 of file SCR_ModularButtonComponent.c.

◆ OnDoubleClick()

override bool OnDoubleClick ( Widget  w,
int  x,
int  y,
int  button 
)

Definition at line 561 of file SCR_ModularButtonComponent.c.

◆ OnFocus()

override bool OnFocus ( Widget  w,
int  x,
int  y 
)

Definition at line 625 of file SCR_ModularButtonComponent.c.

◆ OnFocusLost()

override bool OnFocusLost ( Widget  w,
int  x,
int  y 
)

Definition at line 644 of file SCR_ModularButtonComponent.c.

◆ OnMouseEnter()

override bool OnMouseEnter ( Widget  w,
int  x,
int  y 
)

Definition at line 571 of file SCR_ModularButtonComponent.c.

◆ OnMouseLeave()

override bool OnMouseLeave ( Widget  w,
Widget  enterW,
int  x,
int  y 
)

Definition at line 601 of file SCR_ModularButtonComponent.c.

◆ SetAllEffectsEnabled()

void SetAllEffectsEnabled ( bool  enable)

Enables ar disables all effects

Parameters
[in]enable

Definition at line 280 of file SCR_ModularButtonComponent.c.

◆ SetData()

void SetData ( Managed  data)
Parameters
[in]data

Definition at line 164 of file SCR_ModularButtonComponent.c.

◆ SetEffectsEnabled()

void SetEffectsEnabled ( string  tag,
bool  enable 
)

Enables or disables all effects with given tag

Parameters
[in]tag
[in]enable

Definition at line 243 of file SCR_ModularButtonComponent.c.

◆ SetEffectsWithAnyTagEnabled()

void SetEffectsWithAnyTagEnabled ( notnull array< string >  tags)

Effects with at least one tag are enabled. Other effects are disabled.

Parameters
[in]tags

Definition at line 259 of file SCR_ModularButtonComponent.c.

◆ SetEnabled()

void SetEnabled ( bool  enabled)
Parameters
[in]enabled

Definition at line 95 of file SCR_ModularButtonComponent.c.

◆ SetIsFocusOnMouseEnter()

void SetIsFocusOnMouseEnter ( bool  focus)
Parameters
[in]focus

Definition at line 679 of file SCR_ModularButtonComponent.c.

◆ SetTogglableOnlyThroughApi()

void SetTogglableOnlyThroughApi ( bool  newValue)
Parameters
[in]newValue

Definition at line 157 of file SCR_ModularButtonComponent.c.

◆ SetToggleable()

void SetToggleable ( bool  toggleable)
Parameters
[in]toggleable

Definition at line 150 of file SCR_ModularButtonComponent.c.

◆ SetToggled()

void SetToggled ( bool  toggled,
bool  invokeOnToggled = true 
)
Parameters
[in]toggled
[in]invokeOnToggled

Definition at line 115 of file SCR_ModularButtonComponent.c.

◆ SetVisible()

bool SetVisible ( bool  visible)
Parameters
[in]visible
Returns

Definition at line 186 of file SCR_ModularButtonComponent.c.

◆ UpdateCurrentState()

protected void UpdateCurrentState ( )

Checks current state, invokes state change effects if state has changed.

Definition at line 318 of file SCR_ModularButtonComponent.c.

Variable Documentation

◆ CLICK

enum EModularButtonState CLICK = 1 << 0

Enum corresponding Enfusion native event types.

◆ DOUBLE_CLICK

enum EModularButtonState DOUBLE_CLICK = 1 << 1

◆ FOCUS_GAINED

enum EModularButtonState FOCUS_GAINED = 1 << 2

◆ FOCUS_LOST

enum EModularButtonState FOCUS_LOST = 1 << 3

◆ m_bCanBeToggled

protected bool m_bCanBeToggled

Definition at line 41 of file SCR_ModularButtonComponent.c.

◆ m_bFocus

protected bool m_bFocus

Definition at line 74 of file SCR_ModularButtonComponent.c.

◆ m_bFocusOnMouseEnter

protected bool m_bFocusOnMouseEnter

Definition at line 53 of file SCR_ModularButtonComponent.c.

◆ m_bIgnoreStandardInputs

protected bool m_bIgnoreStandardInputs

Definition at line 56 of file SCR_ModularButtonComponent.c.

◆ m_bMouseOver

protected bool m_bMouseOver

Definition at line 75 of file SCR_ModularButtonComponent.c.

◆ m_bToggled

protected bool m_bToggled

Definition at line 76 of file SCR_ModularButtonComponent.c.

◆ m_bToggledAtStart

protected bool m_bToggledAtStart

Definition at line 47 of file SCR_ModularButtonComponent.c.

◆ m_bToggledOnlyThroughApi

protected bool m_bToggledOnlyThroughApi

Definition at line 44 of file SCR_ModularButtonComponent.c.

◆ m_eEventReturnValue

protected EModularButtonEventHandler m_eEventReturnValue

Definition at line 50 of file SCR_ModularButtonComponent.c.

◆ m_eState

protected EModularButtonState m_eState

Definition at line 77 of file SCR_ModularButtonComponent.c.

◆ m_OnClicked

ref ScriptInvoker m_OnClicked = new ScriptInvoker()

Definition at line 60 of file SCR_ModularButtonComponent.c.

◆ m_OnDoubleClicked

ref ScriptInvoker m_OnDoubleClicked = new ScriptInvoker()

Definition at line 61 of file SCR_ModularButtonComponent.c.

◆ m_OnFocus

ref ScriptInvoker m_OnFocus = new ScriptInvoker()

Definition at line 63 of file SCR_ModularButtonComponent.c.

◆ m_OnFocusLost

ref ScriptInvoker m_OnFocusLost = new ScriptInvoker()

Definition at line 64 of file SCR_ModularButtonComponent.c.

◆ m_OnMouseEnter

ref ScriptInvoker m_OnMouseEnter = new ScriptInvoker()

Definition at line 65 of file SCR_ModularButtonComponent.c.

◆ m_OnMouseLeave

ref ScriptInvoker m_OnMouseLeave = new ScriptInvoker()

Definition at line 66 of file SCR_ModularButtonComponent.c.

◆ m_OnToggled

ref ScriptInvoker m_OnToggled = new ScriptInvoker()

Definition at line 62 of file SCR_ModularButtonComponent.c.

◆ m_UserData

protected ref Managed m_UserData

Definition at line 80 of file SCR_ModularButtonComponent.c.

◆ m_wRoot

protected Widget m_wRoot

Definition at line 71 of file SCR_ModularButtonComponent.c.

◆ MOUSE_ENTER

enum EModularButtonState MOUSE_ENTER = 1 << 4

◆ MOUSE_LEAVE

enum EModularButtonState MOUSE_LEAVE = 1 << 5

◆ STATE_ACTIVATED

STATE_ACTIVATED = 1 << 2

Activated.

Definition at line 4 of file SCR_ModularButtonComponent.c.

◆ STATE_ACTIVATED_HOVERED

STATE_ACTIVATED_HOVERED = 1 << 3

Activated and hovered.

Definition at line 5 of file SCR_ModularButtonComponent.c.

◆ STATE_DEFAULT

STATE_DEFAULT = 1 << 0

Default state.

Definition at line 2 of file SCR_ModularButtonComponent.c.

◆ STATE_DISABLED

STATE_DISABLED = 1 << 4

Disabled.

Definition at line 6 of file SCR_ModularButtonComponent.c.

◆ STATE_DISABLED_ACTIVATED

STATE_DISABLED_ACTIVATED = 1 << 5

Disabled and activated.

Definition at line 7 of file SCR_ModularButtonComponent.c.

◆ STATE_HOVERED

STATE_HOVERED = 1 << 1

Hovered.

Definition at line 3 of file SCR_ModularButtonComponent.c.