Пример #1
0
        protected override void CreateMenuItems()
        {
            ToggleValueMenuItem mouseVisibilityToggleMenuItem = new ToggleValueMenuItem("Mouse Visibility", "Invisible", Game);
            mouseVisibilityToggleMenuItem.OnToggle(toggleMouseVisibility);
            m_Menu.Add(mouseVisibilityToggleMenuItem);

            ToggleValueMenuItem fullScreenModeMenuItem = new ToggleValueMenuItem("Full Screen Mode", "Off", Game);
            fullScreenModeMenuItem.OnToggle(toggleFullScreen);
            m_Menu.Add(fullScreenModeMenuItem);

            ToggleValueMenuItem allowWindowResizingMenuItem = new ToggleValueMenuItem("Allow Window Resizing", "Off", Game);
            allowWindowResizingMenuItem.OnToggle(toggleAllowWindowResize);
            m_Menu.Add(allowWindowResizingMenuItem);

            SingleActionMenuItem doneMenuItem = new SingleActionMenuItem("Done", Game);
            doneMenuItem.Action += done;
            m_Menu.Add(doneMenuItem);
        }
Пример #2
0
        protected override void CreateMenuItems()
        {
            SingleActionMenuItem screenOptionsMenuItem = new SingleActionMenuItem("Screen Options", Game);
            screenOptionsMenuItem.Action += goToScreenOptions;
            m_Menu.Add(screenOptionsMenuItem);

            ToggleValueMenuItem numPlayersMenuItem = new ToggleValueMenuItem("Players", "One", Game);
            numPlayersMenuItem.Increase += numPlayersIncreased;
            numPlayersMenuItem.Decrease += numPlayersDecreased;
            m_Menu.Add(numPlayersMenuItem);

            SingleActionMenuItem soundOptionsScreenMenuItem = new SingleActionMenuItem("Sound Options", Game);
            soundOptionsScreenMenuItem.Action += goToSoundOptions;
            m_Menu.Add(soundOptionsScreenMenuItem);

            SingleActionMenuItem playGameMenuItem = new SingleActionMenuItem("Play", Game);
            playGameMenuItem.Action += playGame;
            m_Menu.Add(playGameMenuItem);

            SingleActionMenuItem exitGameMenuItem = new SingleActionMenuItem("Quit", Game);
            exitGameMenuItem.Action += exitGame;
            m_Menu.Add(exitGameMenuItem);
        }