private void InitStoredGameLoaderMenu() { storedGameLoaderMenu.menuName.text = "Load stored game"; List <string> storedGameNames = PersistanceHelper.GetStoredGameNames(); foreach (string storedGameName in storedGameNames) { storedGameLoaderMenu.AddButton(storedGameName, delegate { LoadStoredGame(storedGameName); }); } storedGameLoaderMenu.AddBackButton(); }
public void InitMenu() { menuController = this.gameObject.GetComponent <ModalMenuController>(); saveButton.onClick.AddListener(DeleteSelectedGames); storedGameNames = PersistanceHelper.GetStoredGameNames(); selectedGameNames = new List <string>(); foreach (string storedGameName in storedGameNames) { menuController.AddButton(storedGameName, delegate { HandleClickOnGameName(storedGameName); }); } if (storedGameNames.Count != 0) { InitColors(storedGameNames[0]); } initiated = true; }
private void RefreshStoredGamesMenu() { List <string> storedGameNames = PersistanceHelper.GetStoredGameNames(); storedGameLoaderMenu.KeepButtons(storedGameNames); }