Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
MenuNavigation Class Reference
Inheritance diagram for MenuNavigation:

Classes

class  SameParentSelectables
 

Public Member Functions

Transform GetSelectableParent (Selectable selectable)
 Returns a Selectable parent if available More...
 
bool IsSelectableValid (Selectable selectable)
 Check if a Selectable is valid. More...
 
void MouseIsHovering ()
 
void ResetAll ()
 Reset all working variables and members. More...
 
void ResetSelectablesOnly ()
 Reset the selectable gameobjects list and basic variables. More...
 
void SelectLastArrowSelected ()
 
void SetItemAsFirstSelected (GameObject go)
 Sets the game as first selected item, to start editing right away or to be able to save directly with the Accept input keys (Enter, KeypadEnter and Space) More...
 
void SetLastItemSelected (int index)
 Saves the last item's index when selected by other input More...
 
void SetMenuNavInputLock (bool newState)
 Set/Clear the Menu Navigation input lock More...
 
void SetSameParentExplicitNavigation (List< Selectable > selectables)
 Sets explicit navigation to the passed selectables list, to the Selectables which are under the same parent, and need to navigate between themselves left and right, and up and down when posible. More...
 
void SetSearchField ()
 Sets the first UINavMouseChecker on a gameObject named "SearchInput", found in the selectables list as IsSearchField so it skips refocus while typing and unhovering it. More...
 
void SetSelectableItems (Selectable[] items, Navigation.Mode navMode)
 Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list More...
 
void SetSelectableItems (Selectable[] items, Navigation.Mode navMode, bool hasText)
 Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list More...
 
void SetSelectableItems (Selectable[] items, Navigation.Mode navMode, bool hasText, bool resetNavMode)
 Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list More...
 
void SetVerticalExplicitNavigation (List< Selectable > selectables)
 Sets explicit navigation in a vertical way following the list order of the given Selectables. More...
 
bool SumbmitOnSelectedToggle ()
 

Static Public Member Functions

static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode)
 Spawns the Menu navigtation on the menu or dialog that needs it. More...
 
static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode, bool limitCheck)
 Spawns the Menu navigtation on the menu or dialog that needs it. More...
 
static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode, bool hasText, bool limitCheck)
 Spawns the Menu navigtation on the menu or dialog that needs it. More...
 
static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode, SliderFocusType focusType)
 Spawns the Menu navigtation on the menu or dialog that needs it. More...
 
static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode, SliderFocusType focusType, bool hasText, bool limitCheck)
 Spawns the Menu navigtation on the menu or dialog that needs it. More...
 
static MenuNavigation SpawnMenuNavigation (GameObject go, Navigation.Mode navMode, bool hasText, bool limitCheck, SliderFocusType focusType, bool includeDisabledChildren=false)
 

Public Attributes

bool Initialized = false
 True once the MenuNavigation has been Initialized. More...
 
List< Selectable > selectableItems = new List<Selectable>()
 

Static Public Attributes

static Color activeTextColor
 Colour used for highlighting active text, default is a bright light gray or white. More...
 
static bool blockPointerEnterExit
 
static Color inactiveTextColor
 Colour used for inactive text, defualt is light gray. More...
 
static Color inactiveTextMiniSettingsColor
 Colour used for inactive text in the mini settings, default is green. More...
 

Protected Attributes

List< SameParentSelectablessameParentSelectables = new List<SameParentSelectables>()
 

Member Function Documentation

Transform MenuNavigation.GetSelectableParent ( Selectable  selectable)
inline

Returns a Selectable parent if available

Parameters
selectableInput Selectable
bool MenuNavigation.IsSelectableValid ( Selectable  selectable)
inline

Check if a Selectable is valid.

Parameters
selectable
Returns
void MenuNavigation.MouseIsHovering ( )
inline
void MenuNavigation.ResetAll ( )
inline

Reset all working variables and members.

void MenuNavigation.ResetSelectablesOnly ( )
inline

Reset the selectable gameobjects list and basic variables.

void MenuNavigation.SelectLastArrowSelected ( )
inline
void MenuNavigation.SetItemAsFirstSelected ( GameObject  go)
inline

Sets the game as first selected item, to start editing right away or to be able to save directly with the Accept input keys (Enter, KeypadEnter and Space)

Parameters
goGameObject to focus
void MenuNavigation.SetLastItemSelected ( int  index)
inline

Saves the last item's index when selected by other input

Parameters
index
void MenuNavigation.SetMenuNavInputLock ( bool  newState)
inline

Set/Clear the Menu Navigation input lock

Parameters
newStateTrue to add the lock
void MenuNavigation.SetSameParentExplicitNavigation ( List< Selectable >  selectables)
inline

Sets explicit navigation to the passed selectables list, to the Selectables which are under the same parent, and need to navigate between themselves left and right, and up and down when posible.

Parameters
selectables
void MenuNavigation.SetSearchField ( )
inline

Sets the first UINavMouseChecker on a gameObject named "SearchInput", found in the selectables list as IsSearchField so it skips refocus while typing and unhovering it.

void MenuNavigation.SetSelectableItems ( Selectable[]  items,
Navigation.Mode  navMode 
)
inline

Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list

Parameters
tParent transform where the search of the selectables needs to start
navModeNavigation Mode for the UI.
void MenuNavigation.SetSelectableItems ( Selectable[]  items,
Navigation.Mode  navMode,
bool  hasText 
)
inline

Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list

Parameters
tParent transform where the search of the selectables needs to start
navModeNavigation Mode for the UI.
hasTextIf has text that needs highlight
void MenuNavigation.SetSelectableItems ( Selectable[]  items,
Navigation.Mode  navMode,
bool  hasText,
bool  resetNavMode 
)
inline

Builds the selectables list, this method is when there is a complicated way of fetching the selectables and the class passes that Selectable list

Parameters
tParent transform where the search of the selectables needs to start
navModeNavigation Mode for the UI.
hasTextIf has text that needs highlight
resetNavModeIf navigation mode sill be set again to the items received
void MenuNavigation.SetVerticalExplicitNavigation ( List< Selectable >  selectables)
inline

Sets explicit navigation in a vertical way following the list order of the given Selectables.

Parameters
selectablesGiven selectable list
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode 
)
inlinestatic

Spawns the Menu navigtation on the menu or dialog that needs it.

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode,
bool  limitCheck 
)
inlinestatic

Spawns the Menu navigtation on the menu or dialog that needs it.

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
limitCheckChecks if the seleciton is going outside the dialog and refocuses back on it, used when there are several selectables causing issues.
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode,
bool  hasText,
bool  limitCheck 
)
inlinestatic

Spawns the Menu navigtation on the menu or dialog that needs it.

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
hasTextIf has text that needs highlight
limitCheckChecks if the seleciton is going outside the dialog and refocuses back on it, used when there are several selectables causing issues.
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode,
SliderFocusType  focusType 
)
inlinestatic

Spawns the Menu navigtation on the menu or dialog that needs it.

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
focusTypeThe way the slider will be focused.
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode,
SliderFocusType  focusType,
bool  hasText,
bool  limitCheck 
)
inlinestatic

Spawns the Menu navigtation on the menu or dialog that needs it.

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
focusTypeThe way the slider will be focused.
hasTextSet to true if has text that needs highlight.
limitCheckChecks if the seleciton is going outside the dialog and refocuses back on it, used when there are several selectables causing issues.
static MenuNavigation MenuNavigation.SpawnMenuNavigation ( GameObject  go,
Navigation.Mode  navMode,
bool  hasText,
bool  limitCheck,
SliderFocusType  focusType,
bool  includeDisabledChildren = false 
)
inlinestatic

Parameters
goGameObject that will have the MenuNavigation component added
navModeNavigation Mode for the UI.
hasTextSet to true if has text that needs highlight.
focusTypeThe way the slider will be focused.
bool MenuNavigation.SumbmitOnSelectedToggle ( )
inline

Member Data Documentation

Color MenuNavigation.activeTextColor
static

Colour used for highlighting active text, default is a bright light gray or white.

bool MenuNavigation.blockPointerEnterExit
static
Color MenuNavigation.inactiveTextColor
static

Colour used for inactive text, defualt is light gray.

Color MenuNavigation.inactiveTextMiniSettingsColor
static

Colour used for inactive text in the mini settings, default is green.

bool MenuNavigation.Initialized = false

True once the MenuNavigation has been Initialized.

List<SameParentSelectables> MenuNavigation.sameParentSelectables = new List<SameParentSelectables>()
protected
List<Selectable> MenuNavigation.selectableItems = new List<Selectable>()

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