Пример #1
0
        public DevMenu()
        {
            MenuElement titleMenuElement = new MenuElement();

            titleMenuElement.MenuText              = "Transmission Debug";
            titleMenuElement.Selectable            = false;
            titleMenuElement.Hidden                = false;
            titleMenuElement.ActiveArea            = new Rectangle(10, 30, 30, 30);
            titleMenuElement.ForegroundColor       = new Color(225, 225, 225);
            titleMenuElement.ActiveForegroundColor = new Color(100, 100, 100);
            titleMenuElement.SpriteFont            = @"Fonts\MenuFont";

            MenuElement playTestElement = new MenuElement();

            playTestElement.MenuText              = "Play Test";
            playTestElement.Selectable            = true;
            playTestElement.Hidden                = false;
            playTestElement.ActiveArea            = new Rectangle(10, 70, 600, 100);
            playTestElement.ForegroundColor       = new Color(225, 225, 225);
            playTestElement.ActiveForegroundColor = new Color(255, 200, 200);
            playTestElement.SpriteFont            = @"Fonts\MenuFont";
            playTestElement.SetThrowPushEvent(new System.Action(() =>
            {
                Master.Push(new PlayableState());
            }));

            MenuElement mapToolElement = new MenuElement();

            mapToolElement.MenuText              = "Map Editor";
            mapToolElement.Selectable            = true;
            mapToolElement.Hidden                = false;
            mapToolElement.ActiveArea            = new Rectangle(10, 50, 600, 100);
            mapToolElement.ForegroundColor       = new Color(225, 225, 225);
            mapToolElement.ActiveForegroundColor = new Color(255, 200, 200);
            mapToolElement.SpriteFont            = @"Fonts\MenuFont";
            mapToolElement.SetThrowPushEvent(new System.Action(() =>
            {
                Graphics.CGraphics.changeResolution(800, 600);
                Master.Push(new EditorMode());
            }));

            _menu = new Gears.Navigation.Menu();

            //_menu.AddMenuElements(new MenuElement[] { titleMenuElement, playTestElement, mapToolElement });

            _menu.AddMenuElement(titleMenuElement);
            _menu.AddMenuElement(mapToolElement);
            _menu.AddMenuElement(playTestElement);
        }
Пример #2
0
        public GameOverState()
        {
            Menu _menu = new Gears.Navigation.Menu();

            MenuElement optionContinue = new MenuElement();

            optionContinue.MenuText              = "Cotinue";
            optionContinue.Selectable            = true;
            optionContinue.Hidden                = false;
            optionContinue.ActiveArea            = new Rectangle(10, 30, 30, 30);
            optionContinue.ForegroundColor       = new Color(225, 225, 225);
            optionContinue.ActiveForegroundColor = new Color(100, 100, 100);
            optionContinue.SpriteFont            = @"Fonts\sherwood";
            _menu.AddMenuElement(optionContinue);

            MenuElement optionSave = new MenuElement();

            optionSave.MenuText              = "Save and Continue";
            optionSave.Selectable            = true;
            optionSave.Hidden                = false;
            optionSave.ActiveArea            = new Rectangle(10, 30, 30, 30);
            optionSave.ForegroundColor       = new Color(225, 225, 225);
            optionSave.ActiveForegroundColor = new Color(100, 100, 100);
            optionSave.SpriteFont            = @"Fonts\sherwood";
            _menu.AddMenuElement(optionSave);

            MenuElement optionQuit = new MenuElement();

            optionQuit.MenuText              = "Save and Quit";
            optionQuit.Selectable            = true;
            optionQuit.Hidden                = false;
            optionQuit.ActiveArea            = new Rectangle(10, 30, 30, 30);
            optionQuit.ForegroundColor       = new Color(225, 225, 225);
            optionQuit.ActiveForegroundColor = new Color(100, 100, 100);
            optionQuit.SpriteFont            = @"Fonts\sherwood";
            _menu.AddMenuElement(optionSave);
        }
Пример #3
0
        public DevMenu()
        {
            _menu = new Gears.Navigation.Menu();

            MenuElement titleMenuElement = new MenuElement();

            titleMenuElement.MenuText              = "Transmission Debug";
            titleMenuElement.Selectable            = false;
            titleMenuElement.Hidden                = false;
            titleMenuElement.ActiveArea            = new Rectangle(10, 30, 30, 30);
            titleMenuElement.ForegroundColor       = new Color(225, 225, 225);
            titleMenuElement.ActiveForegroundColor = new Color(100, 100, 100);
            titleMenuElement.SpriteFont            = @"Fonts\MenuFont";
            _menu.AddMenuElement(titleMenuElement);

            MenuElement playTestElement = new MenuElement();

            playTestElement.MenuText              = "Kokiri Forest (With title)";
            playTestElement.Selectable            = true;
            playTestElement.Hidden                = false;
            playTestElement.ActiveArea            = new Rectangle(10, 50, 600, 100);
            playTestElement.ForegroundColor       = new Color(225, 225, 225);
            playTestElement.ActiveForegroundColor = new Color(255, 200, 200);
            playTestElement.SpriteFont            = @"Fonts\MenuFont";
            playTestElement.SetThrowPushEvent(new System.Action(() =>
            {
                //Master.Push(new PlayableState());
                Master.Push(new splash.CTitleState());
            }));
            _menu.AddMenuElement(playTestElement);

            MenuElement hyruleCastleTownElement = new MenuElement();

            hyruleCastleTownElement.MenuText              = "Hyrule Castle Town";
            hyruleCastleTownElement.Selectable            = true;
            hyruleCastleTownElement.Hidden                = false;
            hyruleCastleTownElement.ActiveArea            = new Rectangle(10, 70, 600, 100);
            hyruleCastleTownElement.ForegroundColor       = new Color(225, 225, 225);
            hyruleCastleTownElement.ActiveForegroundColor = new Color(255, 200, 200);
            hyruleCastleTownElement.SpriteFont            = @"Fonts\MenuFont";
            hyruleCastleTownElement.SetThrowPushEvent(new System.Action(() =>
            {
                //Master.Push(new PlayableState());
                Master.Push(new MapTests.HryuleCastleTownTest());
            }));
            _menu.AddMenuElement(hyruleCastleTownElement);

            if (System.Environment.OSVersion.Platform != System.PlatformID.Unix)
            {
                MenuElement mapToolElement = new MenuElement();
                mapToolElement.MenuText              = "Map Editor";
                mapToolElement.Selectable            = true;
                mapToolElement.Hidden                = false;
                mapToolElement.ActiveArea            = new Rectangle(10, 90, 600, 100);
                mapToolElement.ForegroundColor       = new Color(225, 225, 225);
                mapToolElement.ActiveForegroundColor = new Color(255, 200, 200);
                mapToolElement.SpriteFont            = @"Fonts\MenuFont";
                mapToolElement.SetThrowPushEvent(new System.Action(() => {
                    Graphics.CGraphics.changeResolution(800, 600);
                    CMasterControl.commNet.Clear();
                    Master.Push(new EditorMode());
                }));
                _menu.AddMenuElement(mapToolElement);
            }
            //_menu.AddMenuElements(new MenuElement[] { titleMenuElement, playTestElement, mapToolElement });
        }