PixelCrushers.DialogueSystem.UnityGUI.Navigation Class Reference

Specifies keyboard and/or controller navigation settings. More...

Collaboration diagram for PixelCrushers.DialogueSystem.UnityGUI.Navigation:

Public Member Functions

void FocusFirstControl ()
 Focuses the first control. More...
 
void CheckNavigationInput (Vector2 relativeMousePosition)
 Checks the navigation input and updates the current control if necessary. More...
 
void Navigate (int direction)
 Navigates in a specified direction. More...
 

Public Attributes

bool enabled = false
 Set true to enable keyboard/controller navigation of GUI controls. More...
 
bool focusFirstControlOnEnable = true
 Set true to always focus the first control when the parent is enabled. More...
 
bool jumpToMousePosition = true
 If the mouse hovers over a control to focus it, set this true<c/c> to jump the current focus to that control. More...
 
GUIControl[] order
 The list of child controls that can be navigated. More...
 
string clickButton = "Fire1"
 The button used to click the current control. More...
 
KeyCode click = KeyCode.Space
 The key used to click the current control. More...
 
KeyCode previous = KeyCode.UpArrow
 The key used to navigate to the previous control. More...
 
KeyCode next = KeyCode.DownArrow
 The key used to navigate to the next control. More...
 
string axis = "Vertical"
 The controller axis that controls navigation. More...
 
bool invertAxis = true
 
float axisRepeatDelay = 1f
 When holding the axis in a direction, the amount of time between navigating to the next/previous control. More...
 
float mouseWheelSensitivity = 5f
 

Properties

string? FocusedControlName [get]
 Gets the name of the control that should currently have focus. More...
 
bool IsClicked [get]
 

Detailed Description

Specifies keyboard and/or controller navigation settings.

Member Function Documentation

◆ CheckNavigationInput()

void PixelCrushers.DialogueSystem.UnityGUI.Navigation.CheckNavigationInput ( Vector2  relativeMousePosition)

Checks the navigation input and updates the current control if necessary.

◆ FocusFirstControl()

void PixelCrushers.DialogueSystem.UnityGUI.Navigation.FocusFirstControl ( )

Focuses the first control.

◆ Navigate()

void PixelCrushers.DialogueSystem.UnityGUI.Navigation.Navigate ( int  direction)

Navigates in a specified direction.

Parameters
directionDirection (-1/+1).

Member Data Documentation

◆ axis

string PixelCrushers.DialogueSystem.UnityGUI.Navigation.axis = "Vertical"

The controller axis that controls navigation.

◆ axisRepeatDelay

float PixelCrushers.DialogueSystem.UnityGUI.Navigation.axisRepeatDelay = 1f

When holding the axis in a direction, the amount of time between navigating to the next/previous control.

◆ click

KeyCode PixelCrushers.DialogueSystem.UnityGUI.Navigation.click = KeyCode.Space

The key used to click the current control.

◆ clickButton

string PixelCrushers.DialogueSystem.UnityGUI.Navigation.clickButton = "Fire1"

The button used to click the current control.

◆ enabled

bool PixelCrushers.DialogueSystem.UnityGUI.Navigation.enabled = false

Set true to enable keyboard/controller navigation of GUI controls.

◆ focusFirstControlOnEnable

bool PixelCrushers.DialogueSystem.UnityGUI.Navigation.focusFirstControlOnEnable = true

Set true to always focus the first control when the parent is enabled.

◆ invertAxis

bool PixelCrushers.DialogueSystem.UnityGUI.Navigation.invertAxis = true

◆ jumpToMousePosition

bool PixelCrushers.DialogueSystem.UnityGUI.Navigation.jumpToMousePosition = true

If the mouse hovers over a control to focus it, set this true<c/c> to jump the current focus to that control.

◆ mouseWheelSensitivity

float PixelCrushers.DialogueSystem.UnityGUI.Navigation.mouseWheelSensitivity = 5f

◆ next

KeyCode PixelCrushers.DialogueSystem.UnityGUI.Navigation.next = KeyCode.DownArrow

The key used to navigate to the next control.

◆ order

GUIControl [] PixelCrushers.DialogueSystem.UnityGUI.Navigation.order

The list of child controls that can be navigated.

You must set populate this list or navigation won't work.

◆ previous

KeyCode PixelCrushers.DialogueSystem.UnityGUI.Navigation.previous = KeyCode.UpArrow

The key used to navigate to the previous control.

Property Documentation

◆ FocusedControlName

string? PixelCrushers.DialogueSystem.UnityGUI.Navigation.FocusedControlName
get

Gets the name of the control that should currently have focus.

The name of the focused control.

◆ IsClicked

bool PixelCrushers.DialogueSystem.UnityGUI.Navigation.IsClicked
get

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