Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_InputButtonDisplay Interface Reference
Inheritance diagram for SCR_InputButtonDisplay:
[legend]

Public Member Functions

override void HandlerAttached (Widget w)
 
void Init (Widget parent)
 Initialise Widget and subscribe to needed ScriptInvokers.
 
bool SetAction (BaseContainer data, BaseContainer filter)
 Get all visual information about the button and apply them.
 
void OverrideTexture (string imagePath, string image=string.Empty, Color color=Color.White, SCR_EButtonSize buttonType=SCR_EButtonSize.KEYBOARD_MEDIUM, bool setOverride=true)
 Overrides Texture of the Button USE SCR_InputButtonComponent.SetTexture() to call.
 
void Resize ()
 Trigger resizing of Button Use SCR_InputButtonComponent.SetSize() to call.
 
void ActionPressed (bool isHoldAction=false)
 
void ActionReleased ()
 
void OnDoubleTap ()
 
ImageWidget GetOutlineWidget ()
 
ImageWidget GetBackgroundWidget ()
 
void AnimateHold ()
 
void AnimateHoldComplete ()
 
void ResetColor ()
 
float GetTextSizeModifier ()
 
bool GetIsOverwritten ()
 
void SetIsOverwritten (bool setOverride)
 

Public Attributes

float m_fAnimationRate
 
float m_fAnimationTime
 

Protected Member Functions

void GetFilter (BaseContainer filter)
 
bool ApplyTextureToButton ()
 Apply textures from set SCR_InputButtonLayout config to ImageWidgets Set the correct size for every widget by using set Height.
 
void GetWidth ()
 
bool CreateAdditionalWidgets ()
 Create temporary ImageWidgets if the Button has more than one texture applied in the config.
 
bool DeleteAdditionalWidgets ()
 Go through all previosly created Widgets and delete them, to keep the widget clean.
 
void SetToggled (bool toggled, bool animate=true, bool invokeChange=true)
 
void AnimateHover ()
 Animate Widget when mouse hovers over it.
 
void AnimateClick ()
 Animate Widget when action is performed.
 
void AnimateDoubleTab ()
 
void AnimateToggle ()
 
void AnimateContinous ()
 
void UpdateEnableColor ()
 Sets the correct color when Widget is initialized. (Active or disabled)
 

Protected Attributes

string m_sButtonText
 
ref array< ref SCR_ButtonTexturem_aButtonTextures = {}
 
SCR_EButtonSize m_eButtonType
 
ResourceName m_sButtonLayoutConfig
 
SCR_InputButtonStyle m_ButtonLayout
 
ref array< ImageWidget > m_aAdditionalWidgets = {}
 
int m_iWidth
 
float m_fMediumButtonWidhtModifier = 1.5
 
float m_fLargeButtonWidhtModifier = 1.78
 
float m_fButtonTextSizeModifier = 3
 
float m_fMaxHoldtime
 
float m_fDoubleTapTime
 
float m_fHoldIndicatorDefaultPosition [2]
 
float m_fHoldIndicatorAnimationPosition [2]
 
bool m_bIsHoldAction
 
bool m_bIsHoldActionOnce
 
bool m_bIsDoubleTapAction
 
bool m_bPressedInput
 
bool m_bCanBeToggled
 
bool m_bIsContinuous
 
bool m_bIsToggled
 
bool m_bIsOverwritten
 
SCR_InputButtonComponent m_InputButtonComp
 
WidgetAnimationAlphaMask m_HoldingAnimation
 
WidgetAnimationPosition m_HoldIndicatorAnimation
 
Widget m_wRoot
 
Widget m_wParent
 
OverlayWidget m_wOverlay
 
OverlayWidget m_wShadowOverlay
 
ImageWidget m_wGlow
 
ImageWidget m_wOutlineClear
 
ImageWidget m_wOutline
 
ImageWidget m_wKeyBG
 
ImageWidget m_wDoubleTabIndicator
 
ImageWidget m_wButtonImgGlow
 
ImageWidget m_wButtonImg
 
ImageWidget m_wHoldIndicator
 
RichTextWidget m_wButtonText
 

Static Protected Attributes

const float HOLD_ANIMATION_FAILED_ANIMATION_SPEED = -2.5
 

Member Function Documentation

◆ ActionPressed()

void SCR_InputButtonDisplay.ActionPressed ( bool  isHoldAction = false)
Parameters
isHoldAction

◆ ActionReleased()

void SCR_InputButtonDisplay.ActionReleased ( )

Check if the animation is still running and it's value is below 1 (1 = animation done)

Reverse the animation speed so it's going backwards fast then it went forward to show the hold action has failed

◆ AnimateClick()

void SCR_InputButtonDisplay.AnimateClick ( )
protected

Animate Widget when action is performed.

Using CallLater to give the animation time to complete before it's being reset to default state

◆ AnimateContinous()

void SCR_InputButtonDisplay.AnimateContinous ( )
protected

◆ AnimateDoubleTab()

void SCR_InputButtonDisplay.AnimateDoubleTab ( )
protected

Using CallLater to give the animation time to complete before it's being reset to default state

Using CallLater to give the animation time to complete before it's being reset to default state

◆ AnimateHold()

void SCR_InputButtonDisplay.AnimateHold ( )

◆ AnimateHoldComplete()

void SCR_InputButtonDisplay.AnimateHoldComplete ( )

◆ AnimateHover()

void SCR_InputButtonDisplay.AnimateHover ( )
protected

Animate Widget when mouse hovers over it.

◆ AnimateToggle()

void SCR_InputButtonDisplay.AnimateToggle ( )
protected

◆ ApplyTextureToButton()

bool SCR_InputButtonDisplay.ApplyTextureToButton ( )
protected

Apply textures from set SCR_InputButtonLayout config to ImageWidgets Set the correct size for every widget by using set Height.

Checks if button has a Image defined in config otherwise it uses the text//

If the button has more than 1 image assigned, we create as many ImageWidgets as we need

Lets just clean up the Images if we dont need them anymore

◆ CreateAdditionalWidgets()

bool SCR_InputButtonDisplay.CreateAdditionalWidgets ( )
protected

Create temporary ImageWidgets if the Button has more than one texture applied in the config.

For each entry in the "inputButton.m_aTextures" array a new ImageWidget will be created to save a lot of space in the widget.

Is the texture has a glow/shadow create that first so it's behind the actual texture

◆ DeleteAdditionalWidgets()

bool SCR_InputButtonDisplay.DeleteAdditionalWidgets ( )
protected

Go through all previosly created Widgets and delete them, to keep the widget clean.

◆ GetBackgroundWidget()

ImageWidget SCR_InputButtonDisplay.GetBackgroundWidget ( )

◆ GetFilter()

void SCR_InputButtonDisplay.GetFilter ( BaseContainer  filter)
protected

◆ GetIsOverwritten()

bool SCR_InputButtonDisplay.GetIsOverwritten ( )

◆ GetOutlineWidget()

ImageWidget SCR_InputButtonDisplay.GetOutlineWidget ( )

◆ GetTextSizeModifier()

float SCR_InputButtonDisplay.GetTextSizeModifier ( )

◆ GetWidth()

void SCR_InputButtonDisplay.GetWidth ( )
protected

Apply correct size to all images

◆ HandlerAttached()

override void SCR_InputButtonDisplay.HandlerAttached ( Widget  w)

◆ Init()

void SCR_InputButtonDisplay.Init ( Widget  parent)

Initialise Widget and subscribe to needed ScriptInvokers.

Parameters
Parentwidget

◆ OnDoubleTap()

void SCR_InputButtonDisplay.OnDoubleTap ( )

◆ OverrideTexture()

void SCR_InputButtonDisplay.OverrideTexture ( string  imagePath,
string  image = string::Empty,
Color  color = Color::White,
SCR_EButtonSize  buttonType = SCR_EButtonSize::KEYBOARD_MEDIUM,
bool  setOverride = true 
)

Overrides Texture of the Button USE SCR_InputButtonComponent.SetTexture() to call.

◆ ResetColor()

void SCR_InputButtonDisplay.ResetColor ( )

◆ Resize()

void SCR_InputButtonDisplay.Resize ( )

Trigger resizing of Button Use SCR_InputButtonComponent.SetSize() to call.

◆ SetAction()

bool SCR_InputButtonDisplay.SetAction ( BaseContainer  data,
BaseContainer  filter 
)

Get all visual information about the button and apply them.

Parameters
data
filter
Returns

Lets apply all gathered textures from the config to the correct ImageWidgets

Update the color 1 frame later in case the parent gets updated the same frame

◆ SetIsOverwritten()

void SCR_InputButtonDisplay.SetIsOverwritten ( bool  setOverride)

◆ SetToggled()

void SCR_InputButtonDisplay.SetToggled ( bool  toggled,
bool  animate = true,
bool  invokeChange = true 
)
protected

◆ UpdateEnableColor()

void SCR_InputButtonDisplay.UpdateEnableColor ( )
protected

Sets the correct color when Widget is initialized. (Active or disabled)

Member Data Documentation

◆ HOLD_ANIMATION_FAILED_ANIMATION_SPEED

const float SCR_InputButtonDisplay.HOLD_ANIMATION_FAILED_ANIMATION_SPEED = -2.5
staticprotected

◆ m_aAdditionalWidgets

ref array<ImageWidget> SCR_InputButtonDisplay.m_aAdditionalWidgets = {}
protected

◆ m_aButtonTextures

ref array<ref SCR_ButtonTexture> SCR_InputButtonDisplay.m_aButtonTextures = {}
protected

◆ m_bCanBeToggled

bool SCR_InputButtonDisplay.m_bCanBeToggled
protected

◆ m_bIsContinuous

bool SCR_InputButtonDisplay.m_bIsContinuous
protected

◆ m_bIsDoubleTapAction

bool SCR_InputButtonDisplay.m_bIsDoubleTapAction
protected

◆ m_bIsHoldAction

bool SCR_InputButtonDisplay.m_bIsHoldAction
protected

◆ m_bIsHoldActionOnce

bool SCR_InputButtonDisplay.m_bIsHoldActionOnce
protected

◆ m_bIsOverwritten

bool SCR_InputButtonDisplay.m_bIsOverwritten
protected

◆ m_bIsToggled

bool SCR_InputButtonDisplay.m_bIsToggled
protected

◆ m_bPressedInput

bool SCR_InputButtonDisplay.m_bPressedInput
protected

◆ m_ButtonLayout

SCR_InputButtonStyle SCR_InputButtonDisplay.m_ButtonLayout
protected

◆ m_eButtonType

SCR_EButtonSize SCR_InputButtonDisplay.m_eButtonType
protected

◆ m_fAnimationRate

float SCR_InputButtonDisplay.m_fAnimationRate

◆ m_fAnimationTime

float SCR_InputButtonDisplay.m_fAnimationTime

◆ m_fButtonTextSizeModifier

float SCR_InputButtonDisplay.m_fButtonTextSizeModifier = 3
protected

◆ m_fDoubleTapTime

float SCR_InputButtonDisplay.m_fDoubleTapTime
protected

◆ m_fHoldIndicatorAnimationPosition

float SCR_InputButtonDisplay.m_fHoldIndicatorAnimationPosition[2]
protected

◆ m_fHoldIndicatorDefaultPosition

float SCR_InputButtonDisplay.m_fHoldIndicatorDefaultPosition[2]
protected

◆ m_fLargeButtonWidhtModifier

float SCR_InputButtonDisplay.m_fLargeButtonWidhtModifier = 1.78
protected

◆ m_fMaxHoldtime

float SCR_InputButtonDisplay.m_fMaxHoldtime
protected

◆ m_fMediumButtonWidhtModifier

float SCR_InputButtonDisplay.m_fMediumButtonWidhtModifier = 1.5
protected

◆ m_HoldIndicatorAnimation

WidgetAnimationPosition SCR_InputButtonDisplay.m_HoldIndicatorAnimation
protected

◆ m_HoldingAnimation

WidgetAnimationAlphaMask SCR_InputButtonDisplay.m_HoldingAnimation
protected

◆ m_InputButtonComp

SCR_InputButtonComponent SCR_InputButtonDisplay.m_InputButtonComp
protected

◆ m_iWidth

int SCR_InputButtonDisplay.m_iWidth
protected

◆ m_sButtonLayoutConfig

ResourceName SCR_InputButtonDisplay.m_sButtonLayoutConfig
protected

◆ m_sButtonText

string SCR_InputButtonDisplay.m_sButtonText
protected

◆ m_wButtonImg

ImageWidget SCR_InputButtonDisplay.m_wButtonImg
protected

◆ m_wButtonImgGlow

ImageWidget SCR_InputButtonDisplay.m_wButtonImgGlow
protected

◆ m_wButtonText

RichTextWidget SCR_InputButtonDisplay.m_wButtonText
protected

◆ m_wDoubleTabIndicator

ImageWidget SCR_InputButtonDisplay.m_wDoubleTabIndicator
protected

◆ m_wGlow

ImageWidget SCR_InputButtonDisplay.m_wGlow
protected

◆ m_wHoldIndicator

ImageWidget SCR_InputButtonDisplay.m_wHoldIndicator
protected

◆ m_wKeyBG

ImageWidget SCR_InputButtonDisplay.m_wKeyBG
protected

◆ m_wOutline

ImageWidget SCR_InputButtonDisplay.m_wOutline
protected

◆ m_wOutlineClear

ImageWidget SCR_InputButtonDisplay.m_wOutlineClear
protected

◆ m_wOverlay

OverlayWidget SCR_InputButtonDisplay.m_wOverlay
protected

◆ m_wParent

Widget SCR_InputButtonDisplay.m_wParent
protected

◆ m_wRoot

Widget SCR_InputButtonDisplay.m_wRoot
protected

◆ m_wShadowOverlay

OverlayWidget SCR_InputButtonDisplay.m_wShadowOverlay
protected

The documentation for this interface was generated from the following file: