//#---------------------------------------------------------- //# * Initialize //#---------------------------------------------------------- public Scene_Title(int index = 0) : base(new Bitmap("background_title.png"), "menu") { int width = 200; int x = (Graphics.ScreenWidth() - width) / 2; if (Saving.SaveFileExists()) _menu = new UI_TextMenu(new string[] { "New Game", "Continue" }, x, 250, width, 100, 1); else _menu = new UI_TextMenu(new string[] { "New Game" }, x, 250, width, 100); }
private void InitializeMenu() { string[] items; if (_level == Global.NUMBER_OF_LEVELS) items = new string[] { "Level Select" }; // if last level else items = new string[] { "Level Select", "Next Level" }; _menu = new UI_TextMenu(items, 300, 480, 200, 80, 1, new Bitmap("window_victory.png")); _menu.Active = false; _menu.Visible = false; }
//#---------------------------------------------------------- //# * Initialize //#---------------------------------------------------------- public Scene_Menu(int index = 0) : base(new Bitmap("background_menu.png"), "menu") { _menu = new UI_TextMenu(new string[] { "Select Level", "Edit Deck" }, 90, 270, 200, 100, index); }
private void InitializeMenu(int index) { int numLevels = Global.Player.UnlockedLevels(); string[] items = new string[numLevels]; for (int i = 0; i < numLevels; i++) items[i] = Global.GetLevelName(i + 1); _menuLevelSelect = new UI_TextMenu(items, 200, 220, 200, 200, index); }
private void UpdateInputMenuMain() { _menuMain.UpdateInput(); if (Controls.AcceptTyped() && _menuMain.Index == 1) { Resource.PlaySound("decision"); _menuConfirm = new UI_Confirm(new string[] { "Are you sure you want to leave the", "battle?" }); _menuMain.Active = false; } else if (Controls.CancelTyped() || (Controls.AcceptTyped() && _menuMain.Index == 0)) { Resource.PlaySound("cancel"); _menuMain.Dispose(); _menuMain = null; _menuGroups.Active = true; } }
private void UpdateInputGroupSelect() { if (Controls.AcceptTyped()) { Game_Group group = _player.Deck.Groups[_menuGroups.Index].Clone(); if (group.IsEmpty()) Resource.PlaySound("buzzer"); else { _menuBattleGroup = new UI_BattleGroup(group, FIELD_X, FIELD_Y); _menuGroups.Active = false; Resource.PlaySound("decision"); } } else if (Controls.CancelTyped()) { _menuMain = new UI_TextMenu(new string[] { "Return to Game", "Return to Level Select" }, 280, 250, 240, 100, 0, new Bitmap("window_battlemenu.png")); _menuGroups.Active = false; Resource.PlaySound("decision"); } _menuGroups.UpdateInput(); }