Exemplo n.º 1
0
 public static bool TryGetSelected(string parentName, out SelectableButton selected) {
     GameObject parent;
     selected = null;
     if (!TryGetParent(parentName, out parent)) return false;
     if (!selectGroup.ContainsKey(parent)) return false;
     foreach (var button in selectGroup[parent]) {
         if (!button.Selected) continue;
         selected = button;
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 private static void DeselectAllExcept(GameObject parent, SelectableButton selected)
 {
     if (!selectGroup.ContainsKey(parent))
     {
         return;
     }
     foreach (var button in selectGroup[parent])
     {
         if (button.Selected && button != selected)
         {
             button.Deselect();
         }
     }
 }
Exemplo n.º 3
0
        private void SubmitPlay()
        {
            string           playerName;
            SelectableButton selected;

            if (!SelectableButton.TryGetSelected(CharSelectWindowName, out selected))
            {
                return;
            }
            if (!Button.TryGetText(selected.gameObject.name, out playerName))
            {
                return;
            }
            socket.Send("SpawnCharacter", characterServer, InputValidator.FmtAllLowercase(playerName));
            uiManager.CloseAllWindows();
        }
Exemplo n.º 4
0
        public static bool TryGetSelected(string parentName, out SelectableButton selected)
        {
            GameObject parent;

            selected = null;
            if (!TryGetParent(parentName, out parent))
            {
                return(false);
            }
            if (!selectGroup.ContainsKey(parent))
            {
                return(false);
            }
            foreach (var button in selectGroup[parent])
            {
                if (!button.Selected)
                {
                    continue;
                }
                selected = button;
                return(true);
            }
            return(false);
        }
Exemplo n.º 5
0
 private static void DeselectAllExcept(GameObject parent, SelectableButton selected) {
     if (!selectGroup.ContainsKey(parent)) return;
     foreach (var button in selectGroup[parent]) {
         if (button.Selected && button != selected) button.Deselect();
     }
 }