void SaveGame() { var menu = new PickSaveSlotMenu(true, (TextId)Base.SystemText.MainMenu_SaveOnWhichPosition, 1); var exchange = Exchange; menu.Closed += (args, _) => { Attach(exchange); // TODO: Prompt user for new save name // Raise(new SaveGameEvent(filename, name)); }; Exchange.Attach(menu); Detach(); }
void LoadGame() { var menu = new PickSaveSlotMenu(false, (TextId)Base.SystemText.MainMenu_WhichSavedGameDoYouWantToLoad, 1); var exchange = Exchange; menu.Closed += (args, id) => { Attach(exchange); if (id.HasValue) { Raise(new LoadGameEvent(id.Value)); } }; Exchange.Attach(menu); Detach(); }