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"); }); }
public LevelMenu() { this.textBox = new TextBox(null, (short)(Systems.screen.viewHalfWidth - 150 - 16), (short)(Systems.screen.viewHalfHeight - 150 - 16), 316, 328); short centerX = (short)(Systems.screen.viewHalfWidth - 28); short centerY = (short)(Systems.screen.viewHalfHeight - 28); //this.cont = new UICreoTextIcon(null, "Continue", "Continue", centerX, centerY, delegate () {} ); this.retry = new UICreoTextIcon(null, "Retry", "Retry", (short)(centerX + 66 + 50), centerY, delegate() { ((LevelScene)Systems.scene).RestartLevel(false); }); this.restart = new UICreoTextIcon(null, "Restart", "Restart", (short)(centerX - 66 - 50), centerY, delegate() { ((LevelScene)Systems.scene).RestartLevel(true); }); this.toMain = new UICreoTextIcon(null, "Menu", "Main Menu", centerX, (short)(centerY - 66 - 50), delegate() { UIHandler.SetMenu(UIHandler.mainMenu, true); }); this.endLevel = new UICreoTextIcon(null, "Exit", "End Level", centerX, (short)(centerY + 66 + 50), delegate() { ((LevelScene)Systems.scene).EndLevel(); }); }