void ToggleFilterSelectability(bool enabled, LeaderBoards.SelectionType selectedType) { buttons.ForEach((type, button) => { if ((selectedType != type && !enabled) || enabled) { button.interactable = enabled; } }); }
private void GetLeaderboardEntries(LeaderBoards.SelectionType selectionType) { currentSelectionType = selectionType; foreach (LeaderboardEntry entry in leaderBoardEntries) { entry.IsVisible(false); } if (!loadingText.IsWaitingForConfirmation) { loadingObject.SetActive(true); loadingText.IsWaitingForConfirmation = true; bool result = LeaderBoards.Instance.GetLeaderBoardData(currentLevelName, OnLeaderBoardEntriesReturned, maxEntries, selectionType); if (!result) { loadingText.SetSuccess(false); } verticalScrollbar.value = 1f; } }