private void FocusIndexChanged(int focusIndex) { SkipWordSelection = false; FocusedSection = (Section)focusIndex; RectTransform focusTarget = null; switch (FocusedSection) { case Section.WordSelector: focusTarget = Controller.GetWordSelectionPanel(); break; case Section.Keyboard: focusTarget = Controller.GetKeyboardSelectionPanel(); break; case Section.Speak: focusTarget = Controller.GetInputSelectionPanel(); break; default: throw new NotImplementedException(focusIndex + ""); } Controller.SetIndicatorRect(focusTarget); }
private IEnumerator RestartFocusCycler() { SelectedWord = null; yield return(new WaitForEndOfFrame()); WordSuggestions = Controller.GetWordSelectionPanel().GetComponentsInChildren <WordSuggestionPresenter>() .Where(x => x) .ToArray(); if (WordSuggestions.Length == 0) { Controller.InputStrategyFinished(); } else { FocusCycler.Start(WordSuggestions.Length); } }