Arma Reforger Script API
|
Public Member Functions | |
override void | HandlerAttached (Widget w) |
override void | HandlerDeattached (Widget w) |
override bool | OnClick (Widget w, int x, int y, int button) |
override void | SetEnabled (bool enabled, bool animate=true) |
override bool | OnMouseButtonDown (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 void | OnDisabled (bool animate) |
override void | OnEnabled (bool animate) |
void | OnButtonHold (float value) |
Called when button is held. | |
void | PlaySoundClicked () |
bool | GetIsHoldingButton () |
void | SetIsHoldingButton (bool isHolding) |
float | GetAnimationRate () |
float | GetAnimationTime () |
bool | GetIsInputCombo () |
ScriptInvokerVoid | GetOnAnimateHover () |
ScriptInvokerVoid | GetOnUpdateEnableColor () |
ScriptInvokerVoid | GetOnHoldAnimComplete () |
void | ProcessKeybindStack (inout int index, notnull array< string > keyStack) |
Iterate trough key bind stack. | |
void | ProcessFilterStack () |
Delete not needed entries from m_aFilterStack and bring it into correct order ! | |
void | SetLabel (string label) |
PUBLIC API\. | |
void | SetLabelColor (notnull Color color) |
Change the color of the Label. | |
bool | SetAction (string action, EInputDeviceType currentInputDevice=-1, bool forceUpdate=false) |
Override action. | |
int | GetSize () |
void | SetSize (int size) |
Change the size of the button. | |
bool | IsClickSoundDisabled () |
void | SetClickSoundDisabled (bool isEnabled) |
Enable / disable the click sound played when button is pressed. | |
void | SetTexture (string imagePath, string image=string.Empty, Color color=Color.FromInt(Color.WHITE), SCR_EButtonSize buttonType=SCR_EButtonSize.KEYBOARD_MEDIUM) |
Override texture in Button. | |
void | ResetTexture () |
Restet Button back to it's default texutre Use after SetTexture() to undo the override. | |
void | SetColorActionDisabled (Color newColor) |
bool | IsHovering () |
void | OnActiveWidgetInteraction (bool isInteractionActive, int delay) |
void | OnDialogOpen (DialogUI dialog) |
void | OnDialogClose (DialogUI dialog) |
bool | IsInTopMenu () |
Returns true if there are no dailogs or if this button is in the last dialog opened. | |
bool | IsInTopDialog () |
Returns true if there if this button is in the last dialog opened. | |
bool | GetForceDisabled () |
Public Member Functions inherited from SCR_ButtonBaseComponent | |
override void | HandlerAttached (Widget w) |
override bool | OnClick (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 | SetToggled (bool toggled, bool animate=true, bool invokeChange=true, bool instant=false) |
bool | IsToggled () |
void | SetToggleable (bool togglable) |
bool | GetToggleable () |
void | ShowBorder (bool show, bool animate=true) |
bool | IsBorderShown () |
void | SetBackgroundColors (Color defColor=null, Color hoverColor=null, Color selectColor=null, Color selectHoverColor=null, Color clickColor=null) |
Alternate way of setting button background colors through script. | |
void | ColorizeBackground (bool animate=true) |
Public Member Functions inherited from SCR_WLibComponentBase | |
override void | HandlerAttached (Widget w) |
override bool | OnClick (Widget w, int x, int y, int button) |
override bool | OnMouseEnter (Widget w, int x, int y) |
override bool | OnFocus (Widget w, int x, int y) |
void | SetHoverSound (string soundHover) |
void | SetClickedSound (string soundClicked) |
string | GetHoverSound () |
string | GetClickedSound () |
void | SetEnabled (bool enabled, bool animate=true) |
void | SetVisible (bool visible, bool animate=true) |
bool | IsEnabled () |
void | SetMouseOverToFocus (bool mouseOverToFocus) |
void | SetDisabledOpacity (float newDisabledOpacity) |
Public Member Functions inherited from SCR_ScriptedWidgetComponent | |
override void | HandlerAttached (Widget w) |
override bool | OnClick (Widget w, int x, int y, int button) |
Widget | GetRootWidget () |
bool | IsVisible () |
Static Public Member Functions | |
static SCR_InputButtonComponent | FindComponent (notnull Widget w) |
static SCR_InputButtonComponent | GetInputButtonComponent (string name, notnull Widget parent, bool searchAllChildren=true) |
Static method to easily find component by providing name and parent. | |
Static Public Member Functions inherited from SCR_ButtonBaseComponent | |
static SCR_ButtonBaseComponent | GetButtonBase (string name, Widget parent, bool searchAllChildren=true) |
Static Public Member Functions inherited from SCR_WLibComponentBase | |
static bool | SetTexture (ImageWidget widget, ResourceName texture, string image="") |
Static Public Member Functions inherited from SCR_ScriptedWidgetComponent | |
static SCR_ScriptedWidgetComponent | GetComponent (TypeName componentType, string name, Widget parent, bool searchAllChildren=true) |
Base method for component lookup through the widget library. | |
Protected Member Functions | |
void | SetEnabled_Internal (bool enabled, bool animate=true) |
void | OnInputDeviceUserChanged (bool isGamepad) |
React on switching between input methods. | |
bool | ChangeInputDevice (EInputDeviceType inputDevice, bool hasFocus, bool resetOverride=false) |
Check for last used input device and get the correct keybind for it. | |
bool | GetInputFilterSettings (BaseContainer filter) |
Check which filter is applied to the action to change the buttons behavior. | |
void | CreateComboWidget () |
Create a second InputButton widget to display combos. | |
void | DeleteComboWidget () |
Delete secound InputButton widget if there is one. | |
void | SetInputAction () |
Add action listeners for selected input action. | |
void | OnButtonPressed (float value, EActionTrigger reason) |
void | OnInput () |
Called when Button is clicked / key is presses. | |
void | ActionPressed (bool isHoldAction=false) |
void | ActionReleased () |
void | SetForceDisabled (bool forceDisabled, bool animate=true) |
void | SetForceDisabledWithDelay (bool forceDisabled, bool animate=true, int delay=0) |
void | OnMenuFocusGained (ChimeraMenuBase menu) |
void | OnMenuFocusLost (ChimeraMenuBase menu) |
void | OnSettingsMenuClosed (ChimeraMenuBase menu) |
Callback method that is triggered when some menu is closed. | |
Protected Member Functions inherited from SCR_ButtonBaseComponent | |
void | OnMenuSelect () |
void | MenuSelectBase () |
void | FindParentMenu () |
Finds the parent menu of this component. | |
bool | IsParentMenuFocused () |
Returns true if parent menu is focused, or if there is no parent menu. | |
Protected Member Functions inherited from SCR_WLibComponentBase | |
void | OnEnabled (bool animate) |
void | OnDisabled (bool animate) |
bool | IsChildWidget (Widget parent, Widget child) |
void | SetAnimationRate () |
void | PlaySound (string sound) |
Static Protected Attributes | |
const string | COMBO_INDICATOR_IMAGE_NAME = "ComboIndicatorImg" |
const string | COMBO_INDICATOR_SHADOW_NAME = "ComboIndicatorShadow" |
const string | COMBO_INDICATOR_DIVIDER_NAME = "keybind_divider" |
const string | COMBO_INDICATOR_COMBO_NAME = "keybind_combo" |
const float | COMBO_INDICATOR_SIZE_MULTIPLIER = 0.5 |
const float | MIN_FONTSIZE_MULTIPLIER = 0.5 |
Additional Inherited Members | |
Static Public Attributes inherited from SCR_WLibComponentBase | |
static const float | START_ANIMATION_RATE = 10001 |
static const float | START_ANIMATION_PERIOD = 250 |
|
protected |
|
protected |
|
protected |
Check for last used input device and get the correct keybind for it.
[in] | EInputDeviceType | type of InputDevice |
[in] | bool | is the realted button focused by mouse |
[in] | bool | reset Button override if it was enabled (false by default) |
Get keybind for selected input action and input device
|
protected |
Create a second InputButton widget to display combos.
Create Combo indicator
Create InputButton widget
|
protected |
Delete secound InputButton widget if there is one.
|
static |
float SCR_InputButtonComponent.GetAnimationRate | ( | ) |
float SCR_InputButtonComponent.GetAnimationTime | ( | ) |
bool SCR_InputButtonComponent.GetForceDisabled | ( | ) |
|
static |
Static method to easily find component by providing name and parent.
Searching all children will go through whole hierarchy, instead of immediate chidren
|
protected |
Check which filter is applied to the action to change the buttons behavior.
bool SCR_InputButtonComponent.GetIsHoldingButton | ( | ) |
bool SCR_InputButtonComponent.GetIsInputCombo | ( | ) |
ScriptInvokerVoid SCR_InputButtonComponent.GetOnAnimateHover | ( | ) |
ScriptInvokerVoid SCR_InputButtonComponent.GetOnHoldAnimComplete | ( | ) |
ScriptInvokerVoid SCR_InputButtonComponent.GetOnUpdateEnableColor | ( | ) |
int SCR_InputButtonComponent.GetSize | ( | ) |
override void SCR_InputButtonComponent.HandlerAttached | ( | Widget | w | ) |
Get the default hold time defined in Project settings
Implements SCR_ButtonBaseComponent.
Implemented in SCR_DeployButton.
override void SCR_InputButtonComponent.HandlerDeattached | ( | Widget | w | ) |
Remove old listener
bool SCR_InputButtonComponent.IsClickSoundDisabled | ( | ) |
bool SCR_InputButtonComponent.IsHovering | ( | ) |
bool SCR_InputButtonComponent.IsInTopDialog | ( | ) |
Returns true if there if this button is in the last dialog opened.
bool SCR_InputButtonComponent.IsInTopMenu | ( | ) |
Returns true if there are no dailogs or if this button is in the last dialog opened.
void SCR_InputButtonComponent.OnActiveWidgetInteraction | ( | bool | isInteractionActive, |
int | delay | ||
) |
void SCR_InputButtonComponent.OnButtonHold | ( | float | value | ) |
Called when button is held.
Float | 0-1. State of button press. |
|
protected |
override bool SCR_InputButtonComponent.OnClick | ( | Widget | w, |
int | x, | ||
int | y, | ||
int | button | ||
) |
Implements SCR_ButtonBaseComponent.
Implemented in SCR_InventoryNavigationButtonBack.
void SCR_InputButtonComponent.OnDialogClose | ( | DialogUI | dialog | ) |
void SCR_InputButtonComponent.OnDialogOpen | ( | DialogUI | dialog | ) |
override void SCR_InputButtonComponent.OnDisabled | ( | bool | animate | ) |
Implements SCR_WLibComponentBase.
override bool SCR_InputButtonComponent.OnDoubleClick | ( | Widget | w, |
int | x, | ||
int | y, | ||
int | button | ||
) |
override void SCR_InputButtonComponent.OnEnabled | ( | bool | animate | ) |
Implements SCR_WLibComponentBase.
|
protected |
Called when Button is clicked / key is presses.
Implemented in SCR_InventoryNavigationButtonBack.
|
protected |
React on switching between input methods.
|
protected |
|
protected |
override bool SCR_InputButtonComponent.OnMouseButtonDown | ( | Widget | w, |
int | x, | ||
int | y, | ||
int | button | ||
) |
override bool SCR_InputButtonComponent.OnMouseEnter | ( | Widget | w, |
int | x, | ||
int | y | ||
) |
Implements SCR_ButtonBaseComponent.
override bool SCR_InputButtonComponent.OnMouseLeave | ( | Widget | w, |
Widget | enterW, | ||
int | x, | ||
int | y | ||
) |
Implements SCR_ButtonBaseComponent.
Implemented in SCR_InventoryNavigationButtonBack.
|
protected |
Callback method that is triggered when some menu is closed.
[in] | menu | that was closed |
void SCR_InputButtonComponent.PlaySoundClicked | ( | ) |
void SCR_InputButtonComponent.ProcessFilterStack | ( | ) |
Delete not needed entries from m_aFilterStack and bring it into correct order !
void SCR_InputButtonComponent.ProcessKeybindStack | ( | inout int | index, |
notnull array< string > | keyStack | ||
) |
Iterate trough key bind stack.
[in,out] | index | gets decremented by one |
void SCR_InputButtonComponent.ResetTexture | ( | ) |
Restet Button back to it's default texutre Use after SetTexture() to undo the override.
bool SCR_InputButtonComponent.SetAction | ( | string | action, |
EInputDeviceType | currentInputDevice = -1 , |
||
bool | forceUpdate = false |
||
) |
Override action.
This changes the visuals of the button based on the new action.
[in] | action | name defined in chimeraInputCommon.conf |
[in] | currentInputDevice | for what input device type this hint should load the data |
[in] | forceUpdate | if this hint should ignore if it is already configured for the same action and try to fetch that data again in order to refresh it |
Implemented in SCR_InventoryNavigationButtonBack.
void SCR_InputButtonComponent.SetClickSoundDisabled | ( | bool | isEnabled | ) |
Enable / disable the click sound played when button is pressed.
void SCR_InputButtonComponent.SetColorActionDisabled | ( | Color | newColor | ) |
override void SCR_InputButtonComponent.SetEnabled | ( | bool | enabled, |
bool | animate = true |
||
) |
Implements SCR_WLibComponentBase.
|
protected |
|
protected |
|
protected |
|
protected |
Add action listeners for selected input action.
void SCR_InputButtonComponent.SetIsHoldingButton | ( | bool | isHolding | ) |
void SCR_InputButtonComponent.SetLabel | ( | string | label | ) |
PUBLIC API\.
Change the Text displayed in the label
void SCR_InputButtonComponent.SetLabelColor | ( | notnull Color | color | ) |
Change the color of the Label.
void SCR_InputButtonComponent.SetSize | ( | int | size | ) |
Change the size of the button.
Int | - Height in px. Width will be calculated automatically |
void SCR_InputButtonComponent.SetTexture | ( | string | imagePath, |
string | image = string::Empty , |
||
Color | color = Color::FromInt(Color.WHITE) , |
||
SCR_EButtonSize | buttonType = SCR_EButtonSize::KEYBOARD_MEDIUM |
||
) |
Override texture in Button.
ImagePath | |
Image | name if using ImageSet. Default: null |
Color | of the Image |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
ref Color SCR_InputButtonComponent.m_ActionDefault |
ref Color SCR_InputButtonComponent.m_ActionDisabled |
ref Color SCR_InputButtonComponent.m_ActionHovered |
ref Color SCR_InputButtonComponent.m_ActionToggled |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool SCR_InputButtonComponent.m_bCanBeDisabled |
bool SCR_InputButtonComponent.m_bChangeLabelColorOnDisabled |
|
protected |
|
protected |
|
protected |
|
protected |
If user changed keybing then it should force update of hints.
|
protected |
|
protected |
|
protected |
|
protected |
bool SCR_InputButtonComponent.m_bIsDoubleTapStated |
|
protected |
|
protected |
bool SCR_InputButtonComponent.m_bIsHovered |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float SCR_InputButtonComponent.m_fHoldIndicatorAnimationTime |
float SCR_InputButtonComponent.m_fHoldIndicatorDefaultPosition |
float SCR_InputButtonComponent.m_fHoldIndicatorHoldPosition |
|
protected |
float SCR_InputButtonComponent.m_fMaxHoldtime |
int SCR_InputButtonComponent.m_iDoubleTapThreshold |
int SCR_InputButtonComponent.m_iHeightInPixel |
|
protected |
InputManager SCR_InputButtonComponent.m_InputManager = GetGame().GetInputManager() |
ref Color SCR_InputButtonComponent.m_LabelDefault |
ref ScriptInvoker SCR_InputButtonComponent.m_OnActivated = new ScriptInvoker() |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |