Пример #1
0
        void IInputStrategy.Initialize(ITypingController controller)
        {
            Controller       = controller;
            KeyboardSelector = controller.GetKeyboardSelector();
            ClientArea       = Controller
                               .GetKeyboardSelectorClientArea()
                               .GetComponent <RectTransform>();
            this.EnsureAssigned(x => x.ClientArea);
            Rows = Controller
                   .GetKeyboardSelectorClientArea()
                   .GetComponentsInChildren <HorizontalLayoutGroup>()
                   .Select(x => x.GetComponent <RectTransform>())
                   .ToArray();
            RowPositions = RowPositions ?? Rows.Select(x => x.localPosition.y).ToArray();

            FocusIndexChanged(Rows.Length / 2); // Start at index 1, so we can see index 0 scroll into view
            LerpClientAreaPosition(1);

            FocusCycler.Start(Rows.Length);
            Controller.SetIndicatorRect(Controller.GetKeyboardSelectionPanel());
        }
Пример #2
0
 void IInputStrategy.Initialize(ITypingController controller)
 {
     Controller      = controller;
     SentenceBuilder = controller.GetSentenceBuilder();
     FocusCycler.Start(3);
 }
 void IInputStrategy.Initialize(ITypingController controller)
 {
     Controller = controller;
     StartCoroutine(RestartFocusCycler());
 }
 void IInputStrategy.Initialize(ITypingController controller)
 {
     Controller      = controller;
     SentenceBuilder = Controller.GetSentenceBuilder();
 }