Exemple #1
0
 /// <summary>
 /// Adds a key binding to a command for this screen. Screen key bindings will only concern the current screen.
 /// They will be evaluated before the global key bindings in the InputManager.
 /// </summary>
 /// <param name="key">The key which triggers the command.</param>
 /// <param name="action">The action which should be executed.</param>
 public void AddKeyBinding(Key key, KeyActionDlgt action)
 {
     if (_keyBindings == null)
     {
         _keyBindings = new Dictionary <Key, KeyAction>();
     }
     _keyBindings[key] = new KeyAction(key, action);
 }
Exemple #2
0
 public KeyAction(Key key, KeyActionDlgt action)
 {
     _key    = key;
     _action = action;
 }
 public void AddKeyBinding(Key key, KeyActionDlgt action)
 {
   lock (_syncObj)
     _keyBindings[key] = new KeyAction(key, action);
 }
Exemple #4
0
 public KeyAction(Key key, KeyActionDlgt action)
 {
   _key = key;
   _action = action;
 }
Exemple #5
0
 public void AddKeyBinding(Key key, KeyActionDlgt action)
 {
     lock (_syncObj)
         _keyBindings[key] = new KeyAction(key, action);
 }