Exemplo n.º 1
0
        protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
        {
            if (args.Repeat)
            {
                return(false);
            }

            switch (args.Key)
            {
            case Key.F1:
                modSelect.ToggleVisibility();
                return(true);

            case Key.F2:
                carousel.SelectRandom();
                return(true);

            case Key.F3:
                beatmapOptions.ToggleVisibility();
                return(true);

            case Key.Enter:
                footer.StartButton.TriggerClick();
                return(true);

            case Key.Delete:
                if (state.Keyboard.ShiftPressed)
                {
                    promptDelete();
                    return(true);
                }
                break;
            }

            return(base.OnKeyDown(state, args));
        }
Exemplo n.º 2
0
 public void SelectRandom() => carousel.SelectRandom();