Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
InputFieldsTabSwitcher Class Reference
Inheritance diagram for InputFieldsTabSwitcher:
ManlySingleton< InputFieldsTabSwitcher >

Public Member Functions

void RegisterInputField (UiInputField input)
 
void UnregisterInputField (UiInputField input)
 
- Public Member Functions inherited from ManlySingleton< InputFieldsTabSwitcher >
override void Elect ()
 

Private Member Functions

void Start ()
 
void Update ()
 
void TrySelectNextInput ()
 
void CheckIfAnyInputIsSelected ()
 
void SelectNextInput ()
 
void IterateSelectableIndex ()
 

Private Attributes

EventSystem currentEventSystem
 
List< UiInputFieldactiveInputs = new List<UiInputField>()
 
int currentActiveInputIndex = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from ManlySingleton< InputFieldsTabSwitcher >
static bool Exists ()
 
- Protected Member Functions inherited from ManlySingleton< InputFieldsTabSwitcher >
void Abdicate ()
 
virtual void OnDestroy ()
 
- Properties inherited from ManlySingleton< InputFieldsTabSwitcher >
static T?? Instance [get]
 
static T InstanceOrNull [get]
 
static Transform STransform [get]
 
static Vector3 SPosition [get, set]
 
static GameObject SGameObject [get]
 

Detailed Description

Definition at line 5 of file InputFieldsTabSwitcher.cs.

Member Function Documentation

◆ CheckIfAnyInputIsSelected()

void InputFieldsTabSwitcher.CheckIfAnyInputIsSelected ( )
inlineprivate

Definition at line 32 of file InputFieldsTabSwitcher.cs.

33 {
34 GameObject selectedObject = currentEventSystem.currentSelectedGameObject;
35 if (selectedObject != null)
36 {
37 currentActiveInputIndex = activeInputs.FindIndex((UiInputField x) => x.gameObject == selectedObject);
38 }
39 }
List< UiInputField > activeInputs

References activeInputs, currentActiveInputIndex, and currentEventSystem.

Referenced by TrySelectNextInput().

◆ IterateSelectableIndex()

void InputFieldsTabSwitcher.IterateSelectableIndex ( )
inlineprivate

Definition at line 52 of file InputFieldsTabSwitcher.cs.

References activeInputs, and currentActiveInputIndex.

Referenced by SelectNextInput().

◆ RegisterInputField()

void InputFieldsTabSwitcher.RegisterInputField ( UiInputField  input)
inline

Definition at line 58 of file InputFieldsTabSwitcher.cs.

59 {
60 if (!activeInputs.Contains(input))
61 {
62 activeInputs.Add(input);
63 }
64 }

References activeInputs.

◆ SelectNextInput()

void InputFieldsTabSwitcher.SelectNextInput ( )
inlineprivate

Definition at line 41 of file InputFieldsTabSwitcher.cs.

42 {
44 {
45 activeInputs[currentActiveInputIndex].DeactivateInputField();
47 currentEventSystem.SetSelectedGameObject(activeInputs[currentActiveInputIndex].gameObject);
48 activeInputs[currentActiveInputIndex].ActivateInputField();
49 }
50 }

References activeInputs, currentActiveInputIndex, currentEventSystem, and IterateSelectableIndex().

Referenced by TrySelectNextInput().

◆ Start()

void InputFieldsTabSwitcher.Start ( )
inlineprivate

Definition at line 13 of file InputFieldsTabSwitcher.cs.

14 {
15 currentEventSystem = EventSystem.current;
16 }

References currentEventSystem.

◆ TrySelectNextInput()

void InputFieldsTabSwitcher.TrySelectNextInput ( )
inlineprivate

◆ UnregisterInputField()

void InputFieldsTabSwitcher.UnregisterInputField ( UiInputField  input)
inline

Definition at line 66 of file InputFieldsTabSwitcher.cs.

67 {
68 if (activeInputs.Contains(input))
69 {
70 activeInputs.Remove(input);
71 }
72 }

References activeInputs.

◆ Update()

void InputFieldsTabSwitcher.Update ( )
inlineprivate

Definition at line 18 of file InputFieldsTabSwitcher.cs.

19 {
20 if (Input.GetKeyDown(KeyCode.Tab))
21 {
23 }
24 }

References TrySelectNextInput().

Member Data Documentation

◆ activeInputs

List<UiInputField> InputFieldsTabSwitcher.activeInputs = new List<UiInputField>()
private

◆ currentActiveInputIndex

int InputFieldsTabSwitcher.currentActiveInputIndex = -1
private

◆ currentEventSystem

EventSystem InputFieldsTabSwitcher.currentEventSystem
private

Definition at line 7 of file InputFieldsTabSwitcher.cs.

Referenced by CheckIfAnyInputIsSelected(), SelectNextInput(), and Start().


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