public override void OnPageRefresh(AdminPageRefreshData adminPageData) { base.OnPageRefresh(adminPageData); currentText.text = "Current Game Mode: " + adminPageData.currentGameMode; isSecretToggle.isOn = adminPageData.isSecret; //generate the drop down options: var optionData = new List <Dropdown.OptionData>(); //Add random entry: optionData.Add(new Dropdown.OptionData { text = "Random" }); foreach (var gameMode in adminPageData.availableGameModes) { optionData.Add(new Dropdown.OptionData { text = gameMode }); } nextDropDown.options = optionData; var index = optionData.FindIndex(x => x.text == adminPageData.nextGameMode); if (index != -1) { nextDropDown.value = index; } }
public void RefreshOnlinePlayerList(AdminPageRefreshData data) { foreach (var e in playerEntries) { Destroy(e.gameObject); } playerEntries.Clear(); foreach (var p in data.players) { var e = Instantiate(playerEntryPrefab, playerListContent); var entry = e.GetComponent <AdminPlayerEntry>(); entry.UpdateButton(p, this); if (p.isOnline) { entry.button.interactable = true; } else { if (!playerChatPage.activeInHierarchy) { entry.button.interactable = false; } } playerEntries.Add(entry); if (SelectedPlayer == p.uid) { entry.SelectPlayer(); if (playerChatPage.activeInHierarchy) { playerChatPageScript.SetData(entry); SelectedPlayer = entry.PlayerData.uid; AddPendingMessagesToLogs(entry.PlayerData.uid, entry.GetPendingMessage()); } if (playerManagePage.activeInHierarchy) { playerManagePageScript.SetData(entry); } } } if (string.IsNullOrEmpty(SelectedPlayer)) { SelectPlayerInList(playerEntries[0]); } }
public override void OnPageRefresh(AdminPageRefreshData adminPageData) { base.OnPageRefresh(adminPageData); var optionData = new List <Dropdown.OptionData> { new Dropdown.OptionData { text = "Select an admin job..." } }; foreach (var job in SOAdminJobsList.Instance.AdminAvailableJobs) { optionData.Add(new Dropdown.OptionData { text = job.DisplayName }); } adminJobsDropdown.value = 0; adminJobsDropdown.options = optionData; }
public virtual void OnPageRefresh(AdminPageRefreshData adminPageData) { currentData = adminPageData; adminTools.RefreshOnlinePlayerList(adminPageData); adminTools.CloseRetrievingDataScreen(); }
public override void OnPageRefresh(AdminPageRefreshData adminPageData) { base.OnPageRefresh(adminPageData); }
public override void OnPageRefresh(AdminPageRefreshData adminPageData) { base.OnPageRefresh(adminPageData); callBlockToggle.isOn = adminPageData.blockCall; recallBlockToggle.isOn = adminPageData.blockRecall; }
public override void OnPageRefresh(AdminPageRefreshData adminPageData) { base.OnPageRefresh(adminPageData); inputField.text = adminPageData.playerLimit.ToString(); }