Ejemplo n.º 1
0
 public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
     if (!e.Handled)
     {
         this.FocusObject?.HandleKeyboardKeyPressed(e);
     }
 }
Ejemplo n.º 2
0
        public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
        {
            if (e.Key == KeyboardKey.Insert)
            {
                Debug.ToggleDebugOverlay();
            }

            base.HandleKeyboardKeyPressed(e);

            if (e.Key == KeyboardKey.Escape)
            {
                this.HandleJoystickButtonPressed(new JoystickButtonPressedEvent()
                {
                    Button = JoystickButton.Back
                });
            }

            if (e.Key == KeyboardKey.Tab)
            {
                this.HandleJoystickButtonPressed(new JoystickButtonPressedEvent()
                {
                    Button = JoystickButton.A
                });
            }

            if (e.Handled)
            {
                return;
            }
        }
Ejemplo n.º 3
0
 public void KeyPressed(KeyboardKeyPressedEvent e)
 {
     if (this._preventEvents)
     {
         return;
     }
     this.currentScene.HandleKeyboardKeyPressed(e);
 }
Ejemplo n.º 4
0
 public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
     if (e.Key == Annex.Scenes.KeyboardKey.Tilde)
     {
         Debug.ToggleDebugOverlay();
         return;
     }
     base.HandleKeyboardKeyPressed(e);
 }
 public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
     if (e.Key == KeyboardKey.Space)
     {
         this.HandleJoystickButtonPressed(new JoystickButtonPressedEvent()
         {
             Button = JoystickButton.A
         });
     }
 }
Ejemplo n.º 6
0
 public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
     e.Handled = true;
     if (e.Key == KeyboardKey.BackSpace)
     {
         if (System.String.IsNullOrEmpty(this.Text.Value))
         {
             return;
         }
         this.Text.Set(this.Text.Value[0..^ 1]);
 public override void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
     e.Handled = true;
     switch (e.Key)
     {
     case KeyboardKey.BackSpace:
         if (UserInput.Length == 0)
         {
             return;
         }
         UserInput = UserInput[0..^ 1];
 public virtual void HandleKeyboardKeyPressed(KeyboardKeyPressedEvent e)
 {
 }