Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GamepadScrollComponent Class Reference
Inheritance diagram for SCR_GamepadScrollComponent:
SCR_ScriptedWidgetComponent

Protected Member Functions

override void HandlerAttached (Widget w)
override void HandlerDeattached (Widget w)
void OnMenuFocusGained (ChimeraMenuBase menu)
void OnMenuFocusLost (ChimeraMenuBase menu)
void OnEachFrame ()
void Update (float tDelta, ScrollLayoutWidget wScroll)
 Call this from the menu, or if used as widget component it gets called automatically.
void HandleGamepadVScrolling (float tDelta, ScrollLayoutWidget wScroll)
void HandleGamepadHScrolling (float tDelta, ScrollLayoutWidget wScroll)
float GetMouseScrollInput ()
void TryFindNewFocus (ScrollLayoutWidget wScroll)
 Tries to find the new widget to focus.
void SetTryFindNewFocus (bool tryFindNewFocus)
void SetEnabled (bool enabled)
void SetEnabled_Internal (bool enabled)
void SetForceDisabled (bool forceDisabled)

Static Protected Member Functions

static float GetHScrollInput ()
static float GetVScrollInput ()
static void TryUnfocusWidget (Widget scroll)
static vector GetVReferencePoint (ScrollLayoutWidget wScroll)
 Returns reference point of the scroll widget.
static vector GetHReferencePoint (ScrollLayoutWidget wScroll)
 Returns reference point of the scroll widget.
static float GetFocusMetric (vector v0, Widget w)
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.

Protected Attributes

bool m_bTryFindNewFocus
bool m_bScrollEnabled
bool m_bIsVerticalScroll
bool m_bAllowScrollWheel
ScrollLayoutWidget m_wScroll
bool m_bMouseScrolled
bool m_bShouldBeEnabled = true
bool m_bForceDisabled

Static Protected Attributes

static const float SCROLL_SPEED_PX_PER_SECOND_MAX = 1500
static const float WIDGET_DETECTION_MARGIN_PX = 3
static const float MOUSE_SCROLL_SPEED = 5
static const float MOUSE_RAW_SCROLL_SPEED = 1000

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.

Definition at line 10 of file SCR_GamepadScroll.c.

Member Function Documentation

◆ FindAllButtons()

void SCR_GamepadScrollComponent::FindAllButtons ( Widget w,
array< Widget > arrayOut )
inlinestaticprotected

Finds all buttons recursively.

Definition at line 423 of file SCR_GamepadScroll.c.

◆ GetFocusMetric()

float SCR_GamepadScrollComponent::GetFocusMetric ( vector v0,
Widget w )
inlinestaticprotected

Definition at line 385 of file SCR_GamepadScroll.c.

◆ GetHReferencePoint()

vector SCR_GamepadScrollComponent::GetHReferencePoint ( ScrollLayoutWidget wScroll)
inlinestaticprotected

Returns reference point of the scroll widget.

Definition at line 359 of file SCR_GamepadScroll.c.

◆ GetHScrollInput()

float SCR_GamepadScrollComponent::GetHScrollInput ( )
inlinestaticprotected

Definition at line 230 of file SCR_GamepadScroll.c.

◆ GetMouseScrollInput()

float SCR_GamepadScrollComponent::GetMouseScrollInput ( )
inlineprotected

Definition at line 242 of file SCR_GamepadScroll.c.

◆ GetVReferencePoint()

vector SCR_GamepadScrollComponent::GetVReferencePoint ( ScrollLayoutWidget wScroll)
inlinestaticprotected

Returns reference point of the scroll widget.

Definition at line 333 of file SCR_GamepadScroll.c.

◆ GetVScrollInput()

float SCR_GamepadScrollComponent::GetVScrollInput ( )
inlinestaticprotected

Definition at line 236 of file SCR_GamepadScroll.c.

◆ GetWidgetRect()

SCR_Rect2D SCR_GamepadScrollComponent::GetWidgetRect ( Widget w)
inlinestaticprotected

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

Definition at line 402 of file SCR_GamepadScroll.c.

◆ HandleGamepadHScrolling()

void SCR_GamepadScrollComponent::HandleGamepadHScrolling ( float tDelta,
ScrollLayoutWidget wScroll )
inlineprotected

Definition at line 201 of file SCR_GamepadScroll.c.

◆ HandleGamepadVScrolling()

void SCR_GamepadScrollComponent::HandleGamepadVScrolling ( float tDelta,
ScrollLayoutWidget wScroll )
inlineprotected

Definition at line 172 of file SCR_GamepadScroll.c.

◆ HandlerAttached()

override void SCR_GamepadScrollComponent::HandlerAttached ( Widget w)
inlineprotected

Definition at line 44 of file SCR_GamepadScroll.c.

◆ HandlerDeattached()

override void SCR_GamepadScrollComponent::HandlerDeattached ( Widget w)
inlineprotected

Definition at line 63 of file SCR_GamepadScroll.c.

◆ OnEachFrame()

void SCR_GamepadScrollComponent::OnEachFrame ( )
inlineprotected

Definition at line 91 of file SCR_GamepadScroll.c.

◆ OnMenuFocusGained()

void SCR_GamepadScrollComponent::OnMenuFocusGained ( ChimeraMenuBase menu)
inlineprotected

Definition at line 77 of file SCR_GamepadScroll.c.

◆ OnMenuFocusLost()

void SCR_GamepadScrollComponent::OnMenuFocusLost ( ChimeraMenuBase menu)
inlineprotected

Definition at line 84 of file SCR_GamepadScroll.c.

◆ SetEnabled()

void SCR_GamepadScrollComponent::SetEnabled ( bool enabled)
inlineprotected

Definition at line 448 of file SCR_GamepadScroll.c.

◆ SetEnabled_Internal()

void SCR_GamepadScrollComponent::SetEnabled_Internal ( bool enabled)
inlineprotected

Definition at line 455 of file SCR_GamepadScroll.c.

◆ SetForceDisabled()

void SCR_GamepadScrollComponent::SetForceDisabled ( bool forceDisabled)
inlineprotected

Definition at line 465 of file SCR_GamepadScroll.c.

◆ SetTryFindNewFocus()

void SCR_GamepadScrollComponent::SetTryFindNewFocus ( bool tryFindNewFocus)
inlineprotected

Definition at line 442 of file SCR_GamepadScroll.c.

◆ TryFindNewFocus()

void SCR_GamepadScrollComponent::TryFindNewFocus ( ScrollLayoutWidget wScroll)
inlineprotected

Tries to find the new widget to focus.

Definition at line 275 of file SCR_GamepadScroll.c.

◆ TryUnfocusWidget()

void SCR_GamepadScrollComponent::TryUnfocusWidget ( Widget scroll)
inlinestaticprotected

Definition at line 259 of file SCR_GamepadScroll.c.

◆ Update()

void SCR_GamepadScrollComponent::Update ( float tDelta,
ScrollLayoutWidget wScroll )
inlineprotected

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

Definition at line 102 of file SCR_GamepadScroll.c.

Member Data Documentation

◆ m_bAllowScrollWheel

bool SCR_GamepadScrollComponent::m_bAllowScrollWheel
protected

Definition at line 22 of file SCR_GamepadScroll.c.

◆ m_bForceDisabled

bool SCR_GamepadScrollComponent::m_bForceDisabled
protected

Definition at line 41 of file SCR_GamepadScroll.c.

◆ m_bIsVerticalScroll

bool SCR_GamepadScrollComponent::m_bIsVerticalScroll
protected

Definition at line 19 of file SCR_GamepadScroll.c.

◆ m_bMouseScrolled

bool SCR_GamepadScrollComponent::m_bMouseScrolled
protected

Definition at line 39 of file SCR_GamepadScroll.c.

◆ m_bScrollEnabled

bool SCR_GamepadScrollComponent::m_bScrollEnabled
protected

Definition at line 16 of file SCR_GamepadScroll.c.

◆ m_bShouldBeEnabled

bool SCR_GamepadScrollComponent::m_bShouldBeEnabled = true
protected

Definition at line 40 of file SCR_GamepadScroll.c.

◆ m_bTryFindNewFocus

bool SCR_GamepadScrollComponent::m_bTryFindNewFocus
protected

Definition at line 13 of file SCR_GamepadScroll.c.

◆ m_wScroll

ScrollLayoutWidget SCR_GamepadScrollComponent::m_wScroll
protected

Definition at line 31 of file SCR_GamepadScroll.c.

◆ MOUSE_RAW_SCROLL_SPEED

const float SCR_GamepadScrollComponent::MOUSE_RAW_SCROLL_SPEED = 1000
staticprotected

Definition at line 29 of file SCR_GamepadScroll.c.

◆ MOUSE_SCROLL_SPEED

const float SCR_GamepadScrollComponent::MOUSE_SCROLL_SPEED = 5
staticprotected

Definition at line 28 of file SCR_GamepadScroll.c.

◆ SCROLL_SPEED_PX_PER_SECOND_MAX

const float SCR_GamepadScrollComponent::SCROLL_SPEED_PX_PER_SECOND_MAX = 1500
staticprotected

Definition at line 25 of file SCR_GamepadScroll.c.

◆ WIDGET_DETECTION_MARGIN_PX

const float SCR_GamepadScrollComponent::WIDGET_DETECTION_MARGIN_PX = 3
staticprotected

Definition at line 26 of file SCR_GamepadScroll.c.


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