Пример #1
0
        public new void Initialize()
        {
            ShouldBeScaled = false;

            bnew = new Elements.MenuAnimatedButton(100, 83, 600, 45, "New");
            bnew.InitAnimation("GUI/Menus/LevelMenu/Campaign", "GUI/Menus/LevelMenu/CampaignSelected", 100, 7, 0);
            bnew.onClicked += new Elements.Button.ClickedEventHandler(newClick);
            controls.Add(bnew);

            bload = new Elements.MenuAnimatedButton(100, 150, 600, 45, "Load");
            bload.InitAnimation("GUI/Menus/Load", "GUI/Menus/LoadSelected", 100, 7, 0);
            bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick);
            controls.Add(bload);

            bcustom = new Elements.MenuAnimatedButton(100, 217, 600, 45, "Custom levels");
            bcustom.InitAnimation("GUI/Menus/LevelMenu/CustomLevels", "GUI/Menus/LevelMenu/CustomLevelsSelected", 100, 7, 0);
            bcustom.isEnabled = false;
            bcustom.onClicked += new Elements.Button.ClickedEventHandler(customClick);
            controls.Add(bcustom);

            ldesign = new Elements.MenuAnimatedButton(100, 284, 600, 45, "LevelDesigner");
            ldesign.InitAnimation("GUI/Menus/LevelMenu/LevelDesigner", "GUI/Menus/LevelMenu/LevelDesignerSelected", 100, 7, 0);
            ldesign.onClicked += new Elements.Button.ClickedEventHandler(ldesign_onClicked);
            controls.Add(ldesign);

            back = new Elements.MenuAnimatedButton(100, 351, 600, 45, "Back");
            back.InitAnimation("GUI/Menus/Back", "GUI/Menus/BackSelected", 100, 7, 0);
            back.onClicked += new Elements.Button.ClickedEventHandler(backClick);
            controls.Add(back);

            base.Initialize();

            background = GUIEngine.s_mainMenu.background;
        }
Пример #2
0
        public new void Initialize()
        {
            ShouldBeScaled = false;

            bnew = new Elements.MenuAnimatedButton(100, 83, 600, 45, "New");
            bnew.InitAnimation("GUI/Menus/LevelMenu/Campaign", "GUI/Menus/LevelMenu/CampaignSelected", 100, 7, 0);
            bnew.onClicked += new Elements.Button.ClickedEventHandler(newClick);
            controls.Add(bnew);

            bload = new Elements.MenuAnimatedButton(100, 150, 600, 45, "Load");
            bload.InitAnimation("GUI/Menus/Load", "GUI/Menus/LoadSelected", 100, 7, 0);
            bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick);
            controls.Add(bload);

            bcustom = new Elements.MenuAnimatedButton(100, 217, 600, 45, "Custom levels");
            bcustom.InitAnimation("GUI/Menus/LevelMenu/CustomLevels", "GUI/Menus/LevelMenu/CustomLevelsSelected", 100, 7, 0);
            bcustom.isEnabled  = false;
            bcustom.onClicked += new Elements.Button.ClickedEventHandler(customClick);
            controls.Add(bcustom);

            ldesign = new Elements.MenuAnimatedButton(100, 284, 600, 45, "LevelDesigner");
            ldesign.InitAnimation("GUI/Menus/LevelMenu/LevelDesigner", "GUI/Menus/LevelMenu/LevelDesignerSelected", 100, 7, 0);
            ldesign.onClicked += new Elements.Button.ClickedEventHandler(ldesign_onClicked);
            controls.Add(ldesign);

            back = new Elements.MenuAnimatedButton(100, 351, 600, 45, "Back");
            back.InitAnimation("GUI/Menus/Back", "GUI/Menus/BackSelected", 100, 7, 0);
            back.onClicked += new Elements.Button.ClickedEventHandler(backClick);
            controls.Add(back);

            base.Initialize();

            background = GUIEngine.s_mainMenu.background;
        }
Пример #3
0
        public new void Initialize()
        {
            ShouldBeScaled = false;
            background     = new Background.MainMenu();

            lvl = new Elements.MenuAnimatedButton(100, 50, 600, 45, "Levels");
            lvl.InitAnimation("GUI/Menus/MainMenu/Levels", "GUI/Menus/MainMenu/LevelsSelected", 100, 7, 160);
            lvl.onClicked += new Elements.Button.ClickedEventHandler(lvlClick);
            controls.Add(lvl);

            sb = new Elements.MenuAnimatedButton(100, 117, 600, 45, "Sandbox");
            sb.InitAnimation("GUI/Menus/MainMenu/Sandbox", "GUI/Menus/MainMenu/SandboxSelected", 100, 7, 0);
            sb.onClicked += new Elements.Button.ClickedEventHandler(sbClick);
            controls.Add(sb);

            hb = new Elements.MenuAnimatedButton(100, 184, 600, 45, "Handbook");
            hb.InitAnimation("GUI/Menus/MainMenu/Handbook", "GUI/Menus/MainMenu/HandbookSelected", 100, 7, 130);
            hb.onClicked += new Elements.Button.ClickedEventHandler(hbClick);
            controls.Add(hb);

            op = new Elements.MenuAnimatedButton(100, 251, 600, 45, "Options");
            op.InitAnimation("GUI/Menus/MainMenu/Options", "GUI/Menus/MainMenu/OptionsSelected", 100, 7, 70);
            op.onClicked += new Elements.Button.ClickedEventHandler(opClick);
            controls.Add(op);

            st = new Elements.MenuAnimatedButton(100, 318, 600, 45, "Statistics");
            st.InitAnimation("GUI/Menus/MainMenu/Statistics", "GUI/Menus/MainMenu/StatisticsSelected", 100, 7, 35);
            st.onClicked += new Elements.Button.ClickedEventHandler(stClick);
            controls.Add(st);

            ex = new Elements.MenuAnimatedButton(100, 385, 600, 45, "Exit");
            ex.InitAnimation("GUI/Menus/MainMenu/Exit", "GUI/Menus/MainMenu/ExitSelected", 100, 7, 105);
            ex.onClicked += new Elements.Button.ClickedEventHandler(exClick);
            controls.Add(ex);

            cr = new Elements.EncyclopediaBrowserButton(Main.WindowWidth - 150, Main.WindowHeight - 35, 150, 35, "Credits");
            cr.OverrideTexture("GUI/Menus/MainMenu/ButtonBackgroundMM");
            cr.Font        = ResourceManager.Load <SpriteFont>("Fonts/LiberationSans_15");
            cr.foreground  = Color.White;
            cr.onClicked  += new Elements.Button.ClickedEventHandler(cr_onClicked);
            cr.IdleOpacity = 0.8f;
            controls.Add(cr);

            intr = new Elements.EncyclopediaBrowserButton(0, Main.WindowHeight - 35, 150, 35, "Intro");
            intr.OverrideTexture("GUI/Menus/MainMenu/ButtonBackgroundMM");
            intr.Font        = ResourceManager.Load <SpriteFont>("Fonts/LiberationSans_15");
            intr.foreground  = Color.White;
            intr.onClicked  += new Elements.Button.ClickedEventHandler(intr_onClicked);
            intr.IdleOpacity = 0.8f;
            controls.Add(intr);

            Main.LoadingDetails = "Initializing scenes...";

            base.Initialize();
        }
Пример #4
0
        public new void Initialize()
        {
            ShouldBeScaled = false;

            bnew = new Elements.MenuAnimatedButton(100, 160, 400, 45, "New");
            bnew.InitAnimation("GUI/Menus/New", "GUI/Menus/NewSelected", 100, 7, 0);
            bnew.onClicked += new Elements.Button.ClickedEventHandler(newClick);
            controls.Add(bnew);

            bload = new Elements.MenuAnimatedButton(100, 225, 400, 45, "Load");
            bload.InitAnimation("GUI/Menus/Load", "GUI/Menus/LoadSelected", 100, 7, 0);
            bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick);
            controls.Add(bload);

            back = new Elements.MenuAnimatedButton(100, 290, 400, 45, "Back");
            back.InitAnimation("GUI/Menus/Back", "GUI/Menus/BackSelected", 100, 7, 0);
            back.onClicked += new Elements.Button.ClickedEventHandler(backClick);
            controls.Add(back);

            base.Initialize();

            background = GUIEngine.s_mainMenu.background;
        }
Пример #5
0
        public new void Initialize()
        {
            ShouldBeScaled = false;

            bnew = new Elements.MenuAnimatedButton(100, 160, 400, 45, "New");
            bnew.InitAnimation("GUI/Menus/New", "GUI/Menus/NewSelected", 100, 7, 0);
            bnew.onClicked += new Elements.Button.ClickedEventHandler(newClick);
            controls.Add(bnew);

            bload = new Elements.MenuAnimatedButton(100, 225, 400, 45, "Load");
            bload.InitAnimation("GUI/Menus/Load", "GUI/Menus/LoadSelected", 100, 7, 0);
            bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick);
            controls.Add(bload);

            back = new Elements.MenuAnimatedButton(100, 290, 400, 45, "Back");
            back.InitAnimation("GUI/Menus/Back", "GUI/Menus/BackSelected", 100, 7, 0);
            back.onClicked += new Elements.Button.ClickedEventHandler(backClick);
            controls.Add(back);

            base.Initialize();

            background = GUIEngine.s_mainMenu.background;
        }
Пример #6
0
        public new void Initialize()
        {
            ShouldBeScaled = false;
            background = new Background.MainMenu();

            lvl = new Elements.MenuAnimatedButton(100, 50, 600, 45, "Levels");
            lvl.InitAnimation("GUI/Menus/MainMenu/Levels", "GUI/Menus/MainMenu/LevelsSelected", 100, 7, 160);
            lvl.onClicked += new Elements.Button.ClickedEventHandler(lvlClick);
            controls.Add(lvl);

            sb = new Elements.MenuAnimatedButton(100, 117, 600, 45, "Sandbox");
            sb.InitAnimation("GUI/Menus/MainMenu/Sandbox", "GUI/Menus/MainMenu/SandboxSelected", 100, 7, 0);
            sb.onClicked +=new Elements.Button.ClickedEventHandler(sbClick);
            controls.Add(sb);

            hb = new Elements.MenuAnimatedButton(100, 184, 600, 45, "Handbook");
            hb.InitAnimation("GUI/Menus/MainMenu/Handbook", "GUI/Menus/MainMenu/HandbookSelected", 100, 7, 130);
            hb.onClicked += new Elements.Button.ClickedEventHandler(hbClick);
            controls.Add(hb);

            op = new Elements.MenuAnimatedButton(100, 251, 600, 45, "Options");
            op.InitAnimation("GUI/Menus/MainMenu/Options", "GUI/Menus/MainMenu/OptionsSelected", 100, 7, 70);
            op.onClicked += new Elements.Button.ClickedEventHandler(opClick);
            controls.Add(op);

            st = new Elements.MenuAnimatedButton(100, 318, 600, 45, "Statistics");
            st.InitAnimation("GUI/Menus/MainMenu/Statistics", "GUI/Menus/MainMenu/StatisticsSelected", 100, 7, 35);
            st.onClicked += new Elements.Button.ClickedEventHandler(stClick);
            controls.Add(st);

            ex = new Elements.MenuAnimatedButton(100, 385, 600, 45, "Exit");
            ex.InitAnimation("GUI/Menus/MainMenu/Exit", "GUI/Menus/MainMenu/ExitSelected", 100, 7, 105);
            ex.onClicked += new Elements.Button.ClickedEventHandler(exClick);
            controls.Add(ex);

            cr = new Elements.EncyclopediaBrowserButton(Main.WindowWidth - 150, Main.WindowHeight - 35, 150, 35, "Credits");
            cr.OverrideTexture("GUI/Menus/MainMenu/ButtonBackgroundMM");
            cr.Font = ResourceManager.Load<SpriteFont>("Fonts/LiberationSans_15");
            cr.foreground = Color.White;
            cr.onClicked += new Elements.Button.ClickedEventHandler(cr_onClicked);
            cr.IdleOpacity = 0.8f;
            controls.Add(cr);

            intr = new Elements.EncyclopediaBrowserButton(0, Main.WindowHeight - 35, 150, 35, "Intro");
            intr.OverrideTexture("GUI/Menus/MainMenu/ButtonBackgroundMM");
            intr.Font = ResourceManager.Load<SpriteFont>("Fonts/LiberationSans_15");
            intr.foreground = Color.White;
            intr.onClicked += new Elements.Button.ClickedEventHandler(intr_onClicked);
            intr.IdleOpacity = 0.8f;
            controls.Add(intr);

            Main.LoadingDetails = "Initializing scenes...";

            base.Initialize();
        }