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); } } }
private void AddCurrent(VKButtonKeyboard bt) { if (currentButton.ContainsKey(bt.key)) { currentButton[bt.key] = bt; } else { currentButton.Add(bt.key, bt); } }
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"); }
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"); } }