Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SCR_GamepadScrollComponent Interface Reference

A component with some functions related to scrolling with gamepad. More...

Inheritance diagram for SCR_GamepadScrollComponent:
[legend]

Public Member Functions

override void HandlerAttached (Widget w)
 
override void HandlerDeattached (Widget w)
 
void OnEachFrame ()
 
void Update (float tDelta, ScrollLayoutWidget wScroll)
 Call this from the menu, or if used as widget component it gets called automatically.
 
void SetTryFindNewFocus (bool tryFindNewFocus)
 
void SetEnabled (bool enabled)
 
void SetEnabled_Internal (bool enabled)
 
- 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_Rect2D GetWidgetRect (Widget w)
 Returns a rect created from widget's GetScreenPos and GetScreenSize.
 
static void FindAllButtons (Widget w, array< Widget > arrayOut)
 Finds all buttons recursively.
 
- 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.
 

Static Public Attributes

static const float SCROLL_SPEED_PX_PER_SECOND_MAX = 1500
 
static const float WIDGET_DETECTION_MARGIN_PX = 3
 

Protected Member Functions

void OnMenuFocusGained (ChimeraMenuBase menu)
 
void OnMenuFocusLost (ChimeraMenuBase menu)
 
void TryFindNewFocus (ScrollLayoutWidget wScroll)
 Tries to find the new widget to focus.
 
void SetForceDisabled (bool forceDisabled)
 

Static Protected Member Functions

static void HandleGamepadScrolling (float tDelta, ScrollLayoutWidget wScroll)
 
static float GetVScrollInput ()
 
static void TryUnfocusWidget (Widget scroll)
 
static vector GetReferencePoint (ScrollLayoutWidget wScroll)
 Returns reference point of the scroll widget.
 
static float GetFocusMetric (vector v0, Widget w)
 

Protected Attributes

bool m_bTryFindNewFocus
 
bool m_bScrollEnabled
 
ScrollLayoutWidget m_wScroll
 
bool m_bShouldBeEnabled = true
 
bool m_bForceDisabled
 
- Protected Attributes inherited from SCR_ScriptedWidgetComponent
Widget m_wRoot
 

Additional Inherited Members

- Public Attributes inherited from SCR_ScriptedWidgetComponent
ref ScriptInvoker m_OnClick = new ScriptInvoker
 

Detailed Description

A component with some functions related to scrolling with gamepad.

It solves smooth scrolling with thumb stick and auto-focusing of widgets when such scrolling is performed.

Must be attached to a vertical scroll widget.

Member Function Documentation

◆ FindAllButtons()

static void SCR_GamepadScrollComponent.FindAllButtons ( Widget  w,
array< Widget >  arrayOut 
)
static

Finds all buttons recursively.

◆ GetFocusMetric()

static float SCR_GamepadScrollComponent.GetFocusMetric ( vector  v0,
Widget  w 
)
staticprotected

◆ GetReferencePoint()

static vector SCR_GamepadScrollComponent.GetReferencePoint ( ScrollLayoutWidget  wScroll)
staticprotected

Returns reference point of the scroll widget.

◆ GetVScrollInput()

static float SCR_GamepadScrollComponent.GetVScrollInput ( )
staticprotected

◆ GetWidgetRect()

static SCR_Rect2D SCR_GamepadScrollComponent.GetWidgetRect ( Widget  w)
static

Returns a rect created from widget's GetScreenPos and GetScreenSize.

◆ HandleGamepadScrolling()

static void SCR_GamepadScrollComponent.HandleGamepadScrolling ( float  tDelta,
ScrollLayoutWidget  wScroll 
)
staticprotected

◆ HandlerAttached()

override void SCR_GamepadScrollComponent.HandlerAttached ( Widget  w)

◆ HandlerDeattached()

override void SCR_GamepadScrollComponent.HandlerDeattached ( Widget  w)

◆ OnEachFrame()

void SCR_GamepadScrollComponent.OnEachFrame ( )

◆ OnMenuFocusGained()

void SCR_GamepadScrollComponent.OnMenuFocusGained ( ChimeraMenuBase  menu)
protected

◆ OnMenuFocusLost()

void SCR_GamepadScrollComponent.OnMenuFocusLost ( ChimeraMenuBase  menu)
protected

◆ SetEnabled()

void SCR_GamepadScrollComponent.SetEnabled ( bool  enabled)

◆ SetEnabled_Internal()

void SCR_GamepadScrollComponent.SetEnabled_Internal ( bool  enabled)

◆ SetForceDisabled()

void SCR_GamepadScrollComponent.SetForceDisabled ( bool  forceDisabled)
protected

◆ SetTryFindNewFocus()

void SCR_GamepadScrollComponent.SetTryFindNewFocus ( bool  tryFindNewFocus)

◆ TryFindNewFocus()

void SCR_GamepadScrollComponent.TryFindNewFocus ( ScrollLayoutWidget  wScroll)
protected

Tries to find the new widget to focus.

◆ TryUnfocusWidget()

static void SCR_GamepadScrollComponent.TryUnfocusWidget ( Widget  scroll)
staticprotected

◆ Update()

void SCR_GamepadScrollComponent.Update ( float  tDelta,
ScrollLayoutWidget  wScroll 
)

Call this from the menu, or if used as widget component it gets called automatically.

Member Data Documentation

◆ m_bForceDisabled

bool SCR_GamepadScrollComponent.m_bForceDisabled
protected

◆ m_bScrollEnabled

bool SCR_GamepadScrollComponent.m_bScrollEnabled
protected

◆ m_bShouldBeEnabled

bool SCR_GamepadScrollComponent.m_bShouldBeEnabled = true
protected

◆ m_bTryFindNewFocus

bool SCR_GamepadScrollComponent.m_bTryFindNewFocus
protected

◆ m_wScroll

ScrollLayoutWidget SCR_GamepadScrollComponent.m_wScroll
protected

◆ SCROLL_SPEED_PX_PER_SECOND_MAX

const float SCR_GamepadScrollComponent.SCROLL_SPEED_PX_PER_SECOND_MAX = 1500
static

◆ WIDGET_DETECTION_MARGIN_PX

const float SCR_GamepadScrollComponent.WIDGET_DETECTION_MARGIN_PX = 3
static

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