コード例 #1
0
        public MainMenu()
        {
            this.textBox = new TextBox(null, (short)(Systems.screen.viewHalfWidth - 150 - 16), (short)(Systems.screen.viewHalfHeight - 150 - 16), 316, 378);

            short centerX = (short)(Systems.screen.viewHalfWidth - 28);
            short centerY = (short)(Systems.screen.viewHalfHeight - 28 + 40);

            this.menuTextPos = (short)(Systems.screen.viewHalfWidth - Systems.fonts.baseText.font.MeasureString(MainMenu.menuText).X * 0.5f);

            //this.goBack = new UICreoTextIcon(null, "Back", "Return", centerX, centerY, delegate () { UIHandler.SetMenu(null, false); } );

            this.log = new UICreoTextIcon(null, "Login", "Login", (short)(centerX - 66 - 50), centerY, delegate() {
                UIHandler.SetMenu(UIHandler.loginMenu, true);
                UIHandler.loginMenu.ShowMenu();
            });

            this.controls = new UICreoTextIcon(null, "Gamepad", "Controls", (short)(centerX - 66 - 50), (short)(centerY - 66 - 50), delegate() {
                UIHandler.SetMenu(UIHandler.controlMenu, true);
            });

            this.worlds   = new UICreoTextIcon(null, "MyWorld", "Worlds", centerX, (short)(centerY - 66 - 50), delegate() { SceneTransition.ToPlanetSelection(); });
            this.myLevels = new UICreoTextIcon(null, "MyLevels", "My Levels", (short)(centerX + 66 + 50), centerY, delegate() { SceneTransition.ToMyLevels(); });

            //this.TOP_RIGHT = new UICreoTextIcon(null, "MyWorld", "My World", (short)(centerX + 66 + 50), (short)(centerY - 66 - 50), delegate () { SceneTransition.ToWorldEditor("__WORLD"); } );

            this.myWorld = new UICreoTextIcon(null, "MyWorld", "My World", centerX, (short)(centerY + 66 + 50), delegate() { SceneTransition.ToWorldEditor("__WORLD"); });
        }