Пример #1
0
        /// <summary>
        /// Constructs a new menu screen with the specified title.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);

            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                true);

            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
        }
Пример #2
0
        public TextScreen(string title, params string[] lines)
        {
            this.title = title;
            this.lines = lines;

            menuCancel = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start, Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape, Keys.Space },
                true);
        }