コード例 #1
0
ファイル: MenuState.cs プロジェクト: skinitimski/Reverence
        protected override void InternalInit()
        {
            ScreenState state = new ScreenState
            {
                Width  = Parent.Configuration.WindowWidth,
                Height = Parent.Configuration.WindowHeight
            };

            //
            // MAIN MENU
            //

            MainStatus  = new Screens.Main.Status(this, state);
            MainOptions = new Screens.Main.Options(this, state);

            List <GameMenu> mainMenus = new List <GameMenu>();

            mainMenus.Add(MainStatus);
            mainMenus.Add(MainOptions);
            mainMenus.Add(new Screens.Main.Time(this, state));
            mainMenus.Add(new Screens.Main.Location(state));

            MainScreen = new MenuScreen(mainMenus, MainOptions);



            //
            // ITEM
            //

            ItemTop   = new Screens.Item.Top(this, state);
            ItemStats = new Screens.Item.Stats(this, state);
            ItemList  = new Screens.Item.List(this, state);

            List <GameMenu> itemMenus = new List <GameMenu>();

            itemMenus.Add(ItemTop);
            itemMenus.Add(ItemStats);
            itemMenus.Add(ItemList);
            itemMenus.Add(new Screens.Item.Info(this, state));
            itemMenus.Add(new Screens.Item.Label(state));

            ItemScreen = new MenuScreen(itemMenus, ItemTop);


            //
            // MATERIA
            //

            MateriaTop     = new Screens.Materia.Top(this, state);
            MateriaList    = new Screens.Materia.List(this, state);
            MateriaArrange = new Screens.Materia.Arrange(this, state);
            MateriaPrompt  = new Screens.Materia.Prompt(this, state);

            List <GameMenu> materiaMenus = new List <GameMenu>();

            materiaMenus.Add(MateriaTop);
            materiaMenus.Add(MateriaList);
            materiaMenus.Add(new Screens.Materia.Stats(this, state));
            materiaMenus.Add(new Screens.Materia.Info(this, state));
            materiaMenus.Add(new Screens.Materia.Label(state));
            materiaMenus.Add(MateriaArrange);
            materiaMenus.Add(MateriaPrompt);

            MateriaScreen = new MenuScreen(materiaMenus, MateriaTop);


            //
            // EQUIP
            //

            EquipTop  = new Screens.Equip.Top(this, state);
            EquipList = new Screens.Equip.List(this, state);

            List <GameMenu> equipMenus = new List <GameMenu>();

            equipMenus.Add(EquipTop);
            equipMenus.Add(EquipList);
            equipMenus.Add(new Screens.Equip.Stats(this, state));
            equipMenus.Add(new Screens.Equip.Selected(this, state));
            equipMenus.Add(new Screens.Equip.Info(this, state));
            equipMenus.Add(new Screens.Equip.Label(state));

            EquipScreen = new MenuScreen(equipMenus, EquipTop);


            //
            // STATUS
            //

            StatusOne   = new Screens.Status.One(this, state);
            StatusTwo   = new Screens.Status.Two(this, state);
            StatusThree = new Screens.Status.Three(this, state);
            StatusLabel = new Screens.Status.Label(this, state);

            List <GameMenu> statusMenus = new List <GameMenu>();

            statusMenus.Add(StatusOne);
            statusMenus.Add(StatusTwo);
            statusMenus.Add(StatusThree);
            statusMenus.Add(StatusLabel);

            StatusScreen = new MenuScreen(statusMenus, StatusLabel);


            //
            // CONFIG
            //

            ConfigMain = new Screens.Config.Main(this, state);

            List <GameMenu> configMenus = new List <GameMenu>();

            configMenus.Add(new Screens.Config.Info(this, state));
            configMenus.Add(new Screens.Config.Label(state));
            configMenus.Add(ConfigMain);
            configMenus.Add(ConfigMain.WindowColorMenu);
            configMenus.Add(ConfigMain.BattleSpeedMenu);

            ConfigScreen = new MenuScreen(configMenus, ConfigMain);


            //
            // PHS
            //

            PhsList  = new Screens.Phs.List(this, state);
            PhsStats = new Screens.Phs.Stats(this, state);

            List <GameMenu> phsMenus = new List <GameMenu>();

            phsMenus.Add(new Screens.Phs.Top(state));
            phsMenus.Add(PhsStats);
            phsMenus.Add(PhsList);
            phsMenus.Add(new Screens.Phs.Info(this, state));
            phsMenus.Add(new Screens.Phs.Label(state));

            PhsScreen = new MenuScreen(phsMenus, PhsStats);


            //
            // SAVE
            //

            SavePrompt  = new Screens.Save.Prompt(this, state);
            SaveConfirm = new Screens.Save.Confirm(this, state);

            List <GameMenu> saveMenus = new List <GameMenu>();

            saveMenus.Add(new Screens.Save.Label(state));
            saveMenus.Add(SavePrompt);
            saveMenus.Add(SaveConfirm);

            SaveScreen = new MenuScreen(saveMenus, SavePrompt);


            ActiveLayer = MainScreen;
            ActiveLayer.Control.SetAsControl();
        }
コード例 #2
0
ファイル: MenuState.cs プロジェクト: skinitimski/Reverence
        protected override void InternalInit()
        {
            ScreenState state = new ScreenState
            {
                Width = Parent.Configuration.WindowWidth,
                Height = Parent.Configuration.WindowHeight
            };

            //
            // MAIN MENU
            //

            MainStatus = new Screens.Main.Status(this, state);
            MainOptions = new Screens.Main.Options(this, state);

            List<GameMenu> mainMenus = new List<GameMenu>();
            mainMenus.Add(MainStatus);
            mainMenus.Add(MainOptions);
            mainMenus.Add(new Screens.Main.Time(this, state));
            mainMenus.Add(new Screens.Main.Location(state));

            MainScreen = new MenuScreen(mainMenus, MainOptions);

            //
            // ITEM
            //

            ItemTop = new Screens.Item.Top(this, state);
            ItemStats = new Screens.Item.Stats(this, state);
            ItemList = new Screens.Item.List(this, state);

            List<GameMenu> itemMenus = new List<GameMenu>();
            itemMenus.Add(ItemTop);
            itemMenus.Add(ItemStats);
            itemMenus.Add(ItemList);
            itemMenus.Add(new Screens.Item.Info(this, state));
            itemMenus.Add(new Screens.Item.Label(state));

            ItemScreen = new MenuScreen(itemMenus, ItemTop);

            //
            // MATERIA
            //

            MateriaTop = new Screens.Materia.Top(this, state);
            MateriaList = new Screens.Materia.List(this, state);
            MateriaArrange = new Screens.Materia.Arrange(this, state);
            MateriaPrompt = new Screens.Materia.Prompt(this, state);

            List<GameMenu> materiaMenus  = new List<GameMenu>();
            materiaMenus.Add(MateriaTop);
            materiaMenus.Add(MateriaList);
            materiaMenus.Add(new Screens.Materia.Stats(this, state));
            materiaMenus.Add(new Screens.Materia.Info(this, state));
            materiaMenus.Add(new Screens.Materia.Label(state));
            materiaMenus.Add(MateriaArrange);
            materiaMenus.Add(MateriaPrompt);

            MateriaScreen = new MenuScreen(materiaMenus, MateriaTop);

            //
            // EQUIP
            //

            EquipTop = new Screens.Equip.Top(this, state);
            EquipList = new Screens.Equip.List(this, state);

            List<GameMenu> equipMenus = new List<GameMenu>();
            equipMenus.Add(EquipTop);
            equipMenus.Add(EquipList);
            equipMenus.Add(new Screens.Equip.Stats(this, state));
            equipMenus.Add(new Screens.Equip.Selected(this, state));
            equipMenus.Add(new Screens.Equip.Info(this, state));
            equipMenus.Add(new Screens.Equip.Label(state));

            EquipScreen = new MenuScreen(equipMenus, EquipTop);

            //
            // STATUS
            //

            StatusOne = new Screens.Status.One(this, state);
            StatusTwo = new Screens.Status.Two(this, state);
            StatusThree = new Screens.Status.Three(this, state);
            StatusLabel = new Screens.Status.Label(this, state);

            List<GameMenu>  statusMenus =  new List<GameMenu>();
            statusMenus.Add(StatusOne);
            statusMenus.Add(StatusTwo);
            statusMenus.Add(StatusThree);
            statusMenus.Add(StatusLabel);

            StatusScreen = new MenuScreen(statusMenus, StatusLabel);

            //
            // CONFIG
            //

            ConfigMain = new Screens.Config.Main(this, state);

            List<GameMenu> configMenus = new List<GameMenu>();
            configMenus.Add(new Screens.Config.Info(this,state));
            configMenus.Add(new Screens.Config.Label(state));
            configMenus.Add(ConfigMain);
            configMenus.Add(ConfigMain.WindowColorMenu);
            configMenus.Add(ConfigMain.BattleSpeedMenu);

            ConfigScreen = new MenuScreen(configMenus, ConfigMain);

            //
            // PHS
            //

            PhsList = new Screens.Phs.List(this, state);
            PhsStats = new Screens.Phs.Stats(this, state);

            List<GameMenu> phsMenus = new List<GameMenu>();
            phsMenus.Add(new Screens.Phs.Top(state));
            phsMenus.Add(PhsStats);
            phsMenus.Add(PhsList);
            phsMenus.Add(new Screens.Phs.Info(this, state));
            phsMenus.Add(new Screens.Phs.Label(state));

            PhsScreen = new MenuScreen(phsMenus, PhsStats);

            //
            // SAVE
            //

            SavePrompt = new Screens.Save.Prompt(this, state);
            SaveConfirm = new Screens.Save.Confirm(this, state);

            List<GameMenu> saveMenus = new List<GameMenu>();
            saveMenus.Add(new Screens.Save.Label(state));
            saveMenus.Add(SavePrompt);
            saveMenus.Add(SaveConfirm);

            SaveScreen = new MenuScreen(saveMenus, SavePrompt);

            ActiveLayer = MainScreen;
            ActiveLayer.Control.SetAsControl();
        }