Пример #1
0
        void beginRebind(UIKeybinds.Action a)
        {
            if (activeButton)
            {
                return;
            }

            Button b = buttonForAction(a);

            b.GetComponentInChildren <Text>().text = "...";

            activeButton = b;
            activeAction = a;
        }
Пример #2
0
        Button buttonForAction(UIKeybinds.Action a)
        {
            switch (a)
            {
            case UIKeybinds.Action.PAN_UP: return(bPanUp);

            case UIKeybinds.Action.PAN_DOWN: return(bPanDown);

            case UIKeybinds.Action.PAN_LEFT: return(bPanLeft);

            case UIKeybinds.Action.PAN_RIGHT: return(bPanRight);

            case UIKeybinds.Action.ZOOM_IN: return(bZoomIn);

            case UIKeybinds.Action.ZOOM_OUT: return(bZoomOut);

            case UIKeybinds.Action.MASK_NATION: return(bNation);

            case UIKeybinds.Action.MASK_PROVINCE: return(bProvince);

            case UIKeybinds.Action.MASK_VOTE_EFFECT: return(bVoteEffect);

            case UIKeybinds.Action.MASK_INFILTRATION: return(bInfiltration);

            case UIKeybinds.Action.MASK_MY_LIKING: return(bMyLiking);

            case UIKeybinds.Action.MASK_THEIR_LIKING: return(bTheirLiking);

            case UIKeybinds.Action.MASK_AWARENESS: return(bAwareness);

            case UIKeybinds.Action.MASK_MY_SUSPICION: return(bMySuspicion);

            case UIKeybinds.Action.MASK_THEIR_SUSPICION: return(bTheirSuspicion);

            case UIKeybinds.Action.MASK_CLEAR_MASKS: return(bClearMasks);

            default: return(null);
            }
        }
Пример #3
0
        void updateButton(UIKeybinds.Action a)
        {
            Button b = buttonForAction(a);

            b.GetComponentInChildren <Text>().text = UIKeybinds.mappings[a].ToString();
        }