Arma Reforger Script API
|
A component with some functions related to scrolling with gamepad. More...
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 |
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.
|
static |
Finds all buttons recursively.
|
staticprotected |
|
staticprotected |
Returns reference point of the scroll widget.
|
staticprotected |
|
static |
Returns a rect created from widget's GetScreenPos and GetScreenSize.
|
staticprotected |
override void SCR_GamepadScrollComponent.HandlerAttached | ( | Widget | w | ) |
Implements SCR_ScriptedWidgetComponent.
override void SCR_GamepadScrollComponent.HandlerDeattached | ( | Widget | w | ) |
void SCR_GamepadScrollComponent.OnEachFrame | ( | ) |
|
protected |
|
protected |
void SCR_GamepadScrollComponent.SetEnabled | ( | bool | enabled | ) |
void SCR_GamepadScrollComponent.SetEnabled_Internal | ( | bool | enabled | ) |
|
protected |
void SCR_GamepadScrollComponent.SetTryFindNewFocus | ( | bool | tryFindNewFocus | ) |
|
protected |
Tries to find the new widget to focus.
|
staticprotected |
void SCR_GamepadScrollComponent.Update | ( | float | tDelta, |
ScrollLayoutWidget | wScroll | ||
) |
Call this from the menu, or if used as widget component it gets called automatically.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |