Ejemplo n.º 1
0
 private void Add(KeyState state, KeySet keys, Action action, bool canActWhenKeyRepeat = false)
 {
     if (_keybinds[state].ContainsKey(keys))
     {
         UIAssistantAPI.Instance.NotificationAPI.NotifyWarnMessage("UIAssistant", string.Format(TextID.KeybindDuplication.GetLocalizedText(), keys.ToString()));
         return;
     }
     _keybinds[state].Add(keys, action);
     if (state == KeyState.Down)
     {
         _canActWhenKeyRepeat.Add(keys, canActWhenKeyRepeat);
     }
 }