internal void OnGUI() { float height = Screen.height / 11f; GUILayout.BeginVertical(GUILayout.Height(Screen.height), GUILayout.Width(Screen.width)); GUILayout.Label("SmokeTest: Leaderboards", GUILayout.Height(height)); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("LB Show UI", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoLeaderboardUI(); } if (GUILayout.Button("Post Score", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoPostScore(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Load Public Scores", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoPublicLoadScores(); } if (GUILayout.Button("Load Leaderboard", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoLoadLeaderboard(); } GUILayout.EndHorizontal(); GUILayout.Space(20); GUILayout.BeginHorizontal(); if (GUILayout.Button("Load Social Scores", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoSocialLoadScores(); } if (GUILayout.Button("Load More Scores", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoLoadMoreScores(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Back", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { mOwner.SetUI(MainGui.Ui.Main); } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(mStatus); GUILayout.EndVertical(); }
internal void OnGUI() { float height = Screen.height / 11f; GUILayout.BeginVertical(GUILayout.Height(Screen.height), GUILayout.Width(Screen.width)); GUILayout.Label("SmokeTest: Video", GUILayout.Height(height)); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Get Capture Capabilities", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoCaptureCapabilities(); } if (GUILayout.Button("Show Capture Overlay", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoCaptureOverlay(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Get Capture State", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoCaptureState(); } if (GUILayout.Button("Is File Capture Available?", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoCaptureAvailable(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Is Capture Supported?", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoCaptureSupported(); } if (GUILayout.Button("Setup Listener", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoRegisterListener(); } GUILayout.EndHorizontal(); GUILayout.Space(20); GUILayout.BeginHorizontal(); if (GUILayout.Button("Back", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { mOwner.SetUI(MainGui.Ui.Main); } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(mStatus); GUILayout.EndVertical(); }
internal void OnGUI() { float height = Screen.height / 11f; GUILayout.BeginVertical(GUILayout.Height(Screen.height), GUILayout.Width(Screen.width)); GUILayout.Label("SmokeTest: Achievements", GUILayout.Height(height)); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Ach Reveal", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoAchievementReveal(GPGSIds.achievement_achievementtoreveal); } if (GUILayout.Button("Ach Reveal Incremental", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoAchievementReveal(GPGSIds.achievement_achievement_hidden_incremental); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Ach Unlock", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoAchievementUnlock(); } if (GUILayout.Button("Ach Increment", GUILayout.ExpandHeight(true))) { DoAchievementIncrement(GPGSIds.achievement_achievementtoincrement); } if (GUILayout.Button("Ach Increment Hidden", GUILayout.ExpandHeight(true))) { DoAchievementIncrement(GPGSIds.achievement_achievement_hidden_incremental); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("List Achievements", GUILayout.ExpandHeight(true))) { DoListAchievements(); } if (GUILayout.Button("List Achievement Descriptions", GUILayout.ExpandHeight(true))) { DoListAchievementDescriptions(); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Ach ShowUI", GUILayout.Height(height), GUILayout.ExpandWidth(true))) { DoAchievementUI(); } if (GUILayout.Button("Back", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { mOwner.SetUI(MainGui.Ui.Main); } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(mStatus); GUILayout.EndVertical(); }
internal void OnGUI() { float height = Screen.height / 11f; GUILayout.BeginVertical(GUILayout.Height(Screen.height), GUILayout.Width(Screen.width)); GUILayout.Label("SmokeTest: Friends", GUILayout.Height(height)); GUILayout.Label("Friend List Visibility Status: " + mFriendsListVisibilityStatus, GUILayout.Height(height)); GUILayout.Label("Number of friends loaded: " + Social.localUser.friends.Length, GUILayout.Height(height)); GUILayout.Label("Load Friends Status: " + PlayGamesPlatform.Instance.GetLastLoadFriendsStatus(), GUILayout.Height(height)); string firstFriend = ""; string firstFriendId = ""; if (Social.localUser.friends.Length > 0) { firstFriend = Social.localUser.friends[0].userName; firstFriendId = Social.localUser.friends[0].id; } GUILayout.Label("First Friend: " + firstFriend, GUILayout.Height(height)); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Back", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { mOwner.SetUI(MainGui.Ui.Main); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (mFriendsListVisibilityStatus == FriendsListVisibilityStatus.Unknown) { PlayGamesPlatform.Instance.GetFriendsListVisibility(/* forceReload= */ true, friendsListVisibilityStatus => { mFriendsListVisibilityStatus = friendsListVisibilityStatus; }); } // Show friends paginated if (GUILayout.Button("Load Friends", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { PlayGamesPlatform.Instance.LoadFriends(2, /* forceReload= */ false, /* callback= */ null); } if (GUILayout.Button("Load More Friends", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { PlayGamesPlatform.Instance.LoadMoreFriends(2, /* callback= */ null); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (GUILayout.Button("Load All Friends", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { Social.localUser.LoadFriends(/* callback= */ null); } if (GUILayout.Button("AskForLoadFriendsResolution", GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { PlayGamesPlatform.Instance.AskForLoadFriendsResolution(status => { // Will be updated next OnGui call mFriendsListVisibilityStatus = FriendsListVisibilityStatus.Unknown; }); } GUILayout.EndHorizontal(); GUILayout.Space(50f); GUILayout.BeginHorizontal(GUILayout.Height(height)); if (Social.localUser.friends.Length > 0) { if (GUILayout.Button("Show Profile: " + firstFriend, GUILayout.ExpandHeight(true), GUILayout.Height(height), GUILayout.ExpandWidth(true))) { PlayGamesPlatform.Instance.ShowCompareProfileWithAlternativeNameHintsUI( firstFriendId, /* otherPlayerInGameName= */ null, /* currentPlayerInGameName= */ null, /* callback= */ null); } } GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.EndVertical(); }