private Window_Confirmation FileConfirmWindow( FileSelectedCommandMenu fileCommandMenu, Window_Title_Start_Game startGameMenu, string caption) { var confirmWindow = new Window_Confirmation(); int height = 64; Vector2 loc = fileCommandMenu.SelectedOptionLoc + new Vector2(-8, 0); if (loc.Y > Config.WINDOW_HEIGHT - height) { loc.Y -= height; } confirmWindow.loc = loc; confirmWindow.set_text(caption); confirmWindow.add_choice("Yes", new Vector2(16, 16)); confirmWindow.add_choice("No", new Vector2(56, 16)); int text_width = Font_Data.text_width(caption, Config.CONVO_FONT); text_width = text_width + 16 + (text_width % 8 == 0 ? 0 : (8 - text_width % 8)); confirmWindow.size = new Vector2(Math.Max(88, text_width), 48); confirmWindow.index = 1; confirmWindow.stereoscopic = Config.TITLE_CHOICE_DEPTH; return(confirmWindow); }
void startGameMenu_Selected(object sender, EventArgs e) { var startGameMenu = sender as Window_Title_Start_Game; Global.game_system.play_se(System_Sounds.Confirm); // New Game if (Global.save_files_info == null || !Global.save_files_info.ContainsKey(startGameMenu.file_id)) { startGameMenu.HideMenus(); var styleSelectionMenu = new StyleSelectionMenu(); styleSelectionMenu.Selected += styleSelectionMenu_Selected; styleSelectionMenu.Canceled += menu_Closed; AddMenu(styleSelectionMenu); } // Existing File else { Vector2 loc = startGameMenu.SelectedOptionLoc; var fileCommandMenu = new FileSelectedCommandMenu(loc, startGameMenu.file_id); fileCommandMenu.Selected += fileCommandMenu_Selected; fileCommandMenu.Canceled += menu_Closed; AddMenu(fileCommandMenu); } }