Modular button implements all logic of a button.
More...
|
void | SetEnabled (bool enabled) |
|
bool | GetEnabled () |
|
void | SetToggled (bool toggled, bool invokeOnToggled=true, bool instant=false) |
|
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) |
| Returns first effect with given tag.
|
|
array< SCR_ButtonEffectBase > | FindAllEffects (string tag) |
|
array< SCR_ButtonEffectBase > | GetAllEffects () |
|
void | SetEffectsEnabled (string tag, bool enable) |
| Enables or disables all effects with given tag.
|
|
void | SetEffectsWithAnyTagEnabled (notnull array< string > tags) |
| Effects with at least one tag are enabled.
|
|
void | SetAllEffectsEnabled (bool enable) |
| Enables ar disables all effects.
|
|
void | InvokeAllEnabledEffects (bool instant) |
| Applies all enabled effects.
|
|
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.
|
|
void | Internal_OnEffectEnabled (SCR_ButtonEffectBase effect) |
| Must only be called by the effect class.
|
|
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 () |
|
Modular button implements all logic of a button.
It can be customised by various SCR_ButtonEffectBase objects attached to it.
◆ _print()
void SCR_ModularButtonComponent._print |
( |
string |
s | ) |
|
◆ FindAllEffects()
- Parameters
-
- Returns
- all effects with given tag
◆ FindComponent()
◆ FindEffect()
Returns first effect with given tag.
- Parameters
-
- Returns
◆ GetAllEffects()
◆ GetCurrentState()
EModularButtonState SCR_ModularButtonComponent.GetCurrentState |
( |
| ) |
|
|
protected |
- Returns
- Enum with current state value
◆ GetCurrentStateName()
string SCR_ModularButtonComponent.GetCurrentStateName |
( |
| ) |
|
◆ GetData()
Managed SCR_ModularButtonComponent.GetData |
( |
| ) |
|
◆ GetEnabled()
bool SCR_ModularButtonComponent.GetEnabled |
( |
| ) |
|
◆ GetFocused()
bool SCR_ModularButtonComponent.GetFocused |
( |
| ) |
|
◆ GetIsFocusOnMouseEnter()
bool SCR_ModularButtonComponent.GetIsFocusOnMouseEnter |
( |
| ) |
|
◆ GetMouseOver()
bool SCR_ModularButtonComponent.GetMouseOver |
( |
| ) |
|
◆ GetRootWidget()
Widget SCR_ModularButtonComponent.GetRootWidget |
( |
| ) |
|
◆ GetToggled()
bool SCR_ModularButtonComponent.GetToggled |
( |
| ) |
|
◆ HandlerAttached()
override void SCR_ModularButtonComponent.HandlerAttached |
( |
Widget |
w | ) |
|
◆ Internal_OnEffectEnabled()
Must only be called by the effect class.
- Parameters
-
◆ Internal_OnMasterButtonEvent()
void SCR_ModularButtonComponent.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 | |
◆ Internal_SetToggled()
void SCR_ModularButtonComponent.Internal_SetToggled |
( |
bool |
newToggled, |
|
|
bool |
invokeOnToggled = true , |
|
|
bool |
instant = false |
|
) |
| |
|
protected |
◆ InvokeAllEnabledEffects()
void SCR_ModularButtonComponent.InvokeAllEnabledEffects |
( |
bool |
instant | ) |
|
Applies all enabled effects.
Param instant should be true for changes to an effect's setting while it is active (eg: change the focused color while element is focused) If instant == false, it's like retriggering the event, eg element simulates being focused again
- Parameters
-
◆ InvokeEffectsEvent()
void SCR_ModularButtonComponent.InvokeEffectsEvent |
( |
EModularButtonEventFlag |
eventFlag, |
|
|
bool |
instant = false |
|
) |
| |
|
protected |
Calls _OnEvent of all enabled effects.
- Parameters
-
[in] | eventFlag | |
[in] | instant | |
◆ OnClick()
override bool SCR_ModularButtonComponent.OnClick |
( |
Widget |
w, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
button |
|
) |
| |
◆ OnDoubleClick()
override bool SCR_ModularButtonComponent.OnDoubleClick |
( |
Widget |
w, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
button |
|
) |
| |
◆ OnFocus()
override bool SCR_ModularButtonComponent.OnFocus |
( |
Widget |
w, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ OnFocusLost()
override bool SCR_ModularButtonComponent.OnFocusLost |
( |
Widget |
w, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ OnMouseEnter()
override bool SCR_ModularButtonComponent.OnMouseEnter |
( |
Widget |
w, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ OnMouseLeave()
override bool SCR_ModularButtonComponent.OnMouseLeave |
( |
Widget |
w, |
|
|
Widget |
enterW, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ SetAllEffectsEnabled()
void SCR_ModularButtonComponent.SetAllEffectsEnabled |
( |
bool |
enable | ) |
|
Enables ar disables all effects.
- Parameters
-
◆ SetData()
void SCR_ModularButtonComponent.SetData |
( |
Managed |
data | ) |
|
◆ SetEffectsEnabled()
void SCR_ModularButtonComponent.SetEffectsEnabled |
( |
string |
tag, |
|
|
bool |
enable |
|
) |
| |
Enables or disables all effects with given tag.
- Parameters
-
◆ SetEffectsWithAnyTagEnabled()
void SCR_ModularButtonComponent.SetEffectsWithAnyTagEnabled |
( |
notnull array< string > |
tags | ) |
|
Effects with at least one tag are enabled.
Other effects are disabled.
- Parameters
-
◆ SetEnabled()
void SCR_ModularButtonComponent.SetEnabled |
( |
bool |
enabled | ) |
|
◆ SetIsFocusOnMouseEnter()
void SCR_ModularButtonComponent.SetIsFocusOnMouseEnter |
( |
bool |
focus | ) |
|
◆ SetTogglableOnlyThroughApi()
void SCR_ModularButtonComponent.SetTogglableOnlyThroughApi |
( |
bool |
newValue | ) |
|
◆ SetToggleable()
void SCR_ModularButtonComponent.SetToggleable |
( |
bool |
toggleable | ) |
|
◆ SetToggled()
void SCR_ModularButtonComponent.SetToggled |
( |
bool |
toggled, |
|
|
bool |
invokeOnToggled = true , |
|
|
bool |
instant = false |
|
) |
| |
- Parameters
-
[in] | toggled | |
[in] | invokeOnToggled | |
◆ SetVisible()
bool SCR_ModularButtonComponent.SetVisible |
( |
bool |
visible | ) |
|
◆ UpdateCurrentState()
void SCR_ModularButtonComponent.UpdateCurrentState |
( |
| ) |
|
|
protected |
Checks current state, invokes state change effects if state has changed.
◆ m_aEffects
◆ m_bCanBeToggled
bool SCR_ModularButtonComponent.m_bCanBeToggled |
|
protected |
◆ m_bFocus
bool SCR_ModularButtonComponent.m_bFocus |
|
protected |
◆ m_bFocusOnMouseEnter
bool SCR_ModularButtonComponent.m_bFocusOnMouseEnter |
|
protected |
◆ m_bIgnoreStandardInputs
bool SCR_ModularButtonComponent.m_bIgnoreStandardInputs |
|
protected |
◆ m_bMouseOver
bool SCR_ModularButtonComponent.m_bMouseOver |
|
protected |
◆ m_bToggled
bool SCR_ModularButtonComponent.m_bToggled |
|
protected |
◆ m_bToggledAtStart
bool SCR_ModularButtonComponent.m_bToggledAtStart |
|
protected |
◆ m_bToggledOnlyThroughApi
bool SCR_ModularButtonComponent.m_bToggledOnlyThroughApi |
|
protected |
◆ m_eEventReturnValue
EModularButtonEventHandler SCR_ModularButtonComponent.m_eEventReturnValue |
|
protected |
◆ m_eState
EModularButtonState SCR_ModularButtonComponent.m_eState |
|
protected |
◆ m_OnClicked
ref ScriptInvoker SCR_ModularButtonComponent.m_OnClicked = new ScriptInvoker() |
◆ m_OnDoubleClicked
ref ScriptInvoker SCR_ModularButtonComponent.m_OnDoubleClicked = new ScriptInvoker() |
◆ m_OnFocus
ref ScriptInvoker SCR_ModularButtonComponent.m_OnFocus = new ScriptInvoker() |
◆ m_OnFocusLost
ref ScriptInvoker SCR_ModularButtonComponent.m_OnFocusLost = new ScriptInvoker() |
◆ m_OnMouseEnter
ref ScriptInvoker SCR_ModularButtonComponent.m_OnMouseEnter = new ScriptInvoker() |
◆ m_OnMouseLeave
ref ScriptInvoker SCR_ModularButtonComponent.m_OnMouseLeave = new ScriptInvoker() |
◆ m_OnToggled
ref ScriptInvoker SCR_ModularButtonComponent.m_OnToggled = new ScriptInvoker() |
◆ m_UserData
ref Managed SCR_ModularButtonComponent.m_UserData |
|
protected |
◆ m_wRoot
Widget SCR_ModularButtonComponent.m_wRoot |
|
protected |
The documentation for this interface was generated from the following file:
- Game/UI/Components/ButtonComponents/ModularButton/SCR_ModularButtonComponent.c