Beispiel #1
0
            protected override bool OnJoystickPress(JoystickPressEvent e)
            {
                if (e.Button == JoystickButton.FirstHatUp + hatIndex)
                {
                    upBox.FadeIn(100, Easing.OutQuint);
                }
                else if (e.Button == JoystickButton.FirstHatDown + hatIndex)
                {
                    downBox.FadeIn(100, Easing.OutQuint);
                }
                else if (e.Button == JoystickButton.FirstHatLeft + hatIndex)
                {
                    leftBox.FadeIn(100, Easing.OutQuint);
                }
                else if (e.Button == JoystickButton.FirstHatRight + hatIndex)
                {
                    rightBox.FadeIn(100, Easing.OutQuint);
                }
                else
                {
                    return(base.OnJoystickPress(e));
                }

                return(true);
            }
            protected override bool OnJoystickPress(JoystickPressEvent e)
            {
                if (e.Button != button)
                {
                    return(base.OnJoystickPress(e));
                }

                background.FadeIn(100, Easing.OutQuint);
                return(true);
            }
Beispiel #3
0
        protected override bool OnJoystickPress(JoystickPressEvent e)
        {
            if (config.GameInputs.TryGetValue(e.Button, out var gi))
            {
                mgr.RegisterHit(InputType.Pressed, gi);
                return(true);
            }

            return(false);
        }
Beispiel #4
0
        protected override bool OnJoystickPress(JoystickPressEvent e)
        {
            if (!HasFocus)
            {
                return(false);
            }

            bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(e.CurrentState));
            finalise();

            return(true);
        }
Beispiel #5
0
            protected override bool OnJoystickPress(JoystickPressEvent e)
            {
                if (e.Button == positiveAxisButton)
                {
                    background.BorderColour = Color4.DarkGreen;
                }
                else if (e.Button == negativeAxisButton)
                {
                    background.BorderColour = Color4.DarkRed;
                }

                return(base.OnJoystickPress(e));
            }
 protected override bool OnJoystickPress(JoystickPressEvent e)
 {
     if (e.Button == positiveAxisButton)
     {
         background.FadeColour(Color4.DarkGreen, 100, Easing.OutQuint);
     }
     else if (e.Button == negativeAxisButton)
     {
         background.FadeColour(Color4.DarkRed, 100, Easing.OutQuint);
     }
     else
     {
         return(base.OnJoystickPress(e));
     }
     return(true);
 }
Beispiel #7
0
 protected override bool OnJoystickPress(JoystickPressEvent e)
 {
     PressReceived = true;
     return(Press?.Invoke() ?? false);
 }
Beispiel #8
0
 protected override bool OnJoystickPress(JoystickPressEvent e)
 {
     ++JoystickPressCount;
     return(base.OnJoystickPress(e));
 }