private bool CheckCommands(KeyCode key)
 {
     if (_cancelCommand != null && _cancelCommand.IsNewlyPressed())
     {
         _cancelCommand.BlockNextRelease();
         InvokeCancel();
         return(true);
     }
     if (_okCommand != null && _okCommand.IsNewlyPressed())
     {
         _okCommand.BlockNextRelease();
         InvokeOk();
         return(true);
     }
     if (_resetCommand != null && _resetCommand.IsNewlyPressed())
     {
         _resetCommand.BlockNextRelease();
         InvokeReset();
         return(true);
     }
     if (key == KeyCode.Mouse0 || key == KeyCode.Mouse1)
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 protected virtual void OnOpenCommand(SingleAxisCommand command)
 {
     if (IsSelected && _openCommands.Contains(command))
     {
         command.ConsumeInput();
         command.BlockNextRelease();
         Open();
     }
 }