Highroad Engine v1.3
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.HighroadEngine.ButtonNavigation Class Reference

This class allows keyboard navigation (up and down arrows by default) through a set of buttons More...

Inheritance diagram for MoreMountains.HighroadEngine.ButtonNavigation:

Public Types

enum  AxisChoices { Vertical , Horizontal }
 

Public Member Functions

virtual void MoveMenu (string direction)
 Prevents fast keystrokes and triggers menu movement. More...
 

Public Attributes

List< Button > ButtonList
 the list of buttons the player will be able to navigate through More...
 
float KeyboardSpeed = 0.3f
 the time in second before each new keystroke gets registered, to prevent ultra fast movement between buttons More...
 
AxisChoices Axis
 
string VerticalAxisInputName
 
string HorizontalAxisInputName
 
bool AutoPressButtonOnFocus =false
 

Protected Member Functions

virtual int MenuSelection (List< Button > buttonList, int currentIndex, string direction)
 Returns a new current index based on the direction the user has input More...
 
virtual void Update ()
 Every frame, checks for input and triggers the MoveMenu method if needed More...
 

Protected Attributes

int _selectedIndex = 0
 
float _timeCounter =0f
 
bool _buttonPressRequired = true
 

Detailed Description

This class allows keyboard navigation (up and down arrows by default) through a set of buttons

Member Enumeration Documentation

◆ AxisChoices

Enumerator
Vertical 
Horizontal 

Member Function Documentation

◆ MenuSelection()

virtual int MoreMountains.HighroadEngine.ButtonNavigation.MenuSelection ( List< Button >  buttonList,
int  currentIndex,
string  direction 
)
protectedvirtual

Returns a new current index based on the direction the user has input

Returns
The selection.
Parameters
buttonListButton list.
currentIndexCurrent index.
directionDirection.

◆ MoveMenu()

virtual void MoreMountains.HighroadEngine.ButtonNavigation.MoveMenu ( string  direction)
virtual

Prevents fast keystrokes and triggers menu movement.

Parameters
directionDirection.

◆ Update()

virtual void MoreMountains.HighroadEngine.ButtonNavigation.Update ( )
protectedvirtual

Every frame, checks for input and triggers the MoveMenu method if needed

Member Data Documentation

◆ _buttonPressRequired

bool MoreMountains.HighroadEngine.ButtonNavigation._buttonPressRequired = true
protected

◆ _selectedIndex

int MoreMountains.HighroadEngine.ButtonNavigation._selectedIndex = 0
protected

◆ _timeCounter

float MoreMountains.HighroadEngine.ButtonNavigation._timeCounter =0f
protected

◆ AutoPressButtonOnFocus

bool MoreMountains.HighroadEngine.ButtonNavigation.AutoPressButtonOnFocus =false

◆ Axis

AxisChoices MoreMountains.HighroadEngine.ButtonNavigation.Axis

◆ ButtonList

List<Button> MoreMountains.HighroadEngine.ButtonNavigation.ButtonList

the list of buttons the player will be able to navigate through

◆ HorizontalAxisInputName

string MoreMountains.HighroadEngine.ButtonNavigation.HorizontalAxisInputName

◆ KeyboardSpeed

float MoreMountains.HighroadEngine.ButtonNavigation.KeyboardSpeed = 0.3f

the time in second before each new keystroke gets registered, to prevent ultra fast movement between buttons

◆ VerticalAxisInputName

string MoreMountains.HighroadEngine.ButtonNavigation.VerticalAxisInputName

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