Example #1
0
    public void NextTextField(VKButtonKeyboard bt)
    {
        if (bt.inputs != null && bt.inputs.Count > 0)
        {
            int max   = bt.inputs.Count;
            int index = bt.inputs.FindIndex(a => a.isFocused);

            VKDebug.LogWarning(index.ToString());
            if (index <= -1)
            {
                return;
            }
            else
            {
                index++;
                if (index >= max)
                {
                    index = 0;
                }

                VKDebug.LogWarning(index.ToString());
                EventSystem.current.SetSelectedGameObject(bt.inputs[index].gameObject, null);
            }
        }
    }
Example #2
0
 private void AddCurrent(VKButtonKeyboard bt)
 {
     if (currentButton.ContainsKey(bt.key))
     {
         currentButton[bt.key] = bt;
     }
     else
     {
         currentButton.Add(bt.key, bt);
     }
 }
Example #3
0
    public void Add(VKButtonKeyboard bt)
    {
        if (!buttons.ContainsKey(bt.key))
        {
            buttons.Add(bt.key, new List <VKButtonKeyboard>());
        }

        buttons[bt.key].Insert(0, bt);
        AddCurrent(bt);
        VKDebug.LogWarning("Add VKButtonKeyboard");
    }
Example #4
0
 public void Remove(VKButtonKeyboard bt)
 {
     if (buttons.ContainsKey(bt.key))
     {
         buttons[bt.key].Remove(bt);
         if (buttons[bt.key].Count > 0)
         {
             AddCurrent(buttons[bt.key][0]);
         }
         else
         {
             currentButton.Remove(bt.key);
         }
         VKDebug.LogWarning("Remove VKButtonKeyboard");
     }
 }