public void RenderOnGUI() { GUILayout.BeginVertical("box"); m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33)); GUILayout.Label("BIsEnabled() : " + SteamMusic.BIsEnabled()); GUILayout.Label("BIsPlaying() : " + SteamMusic.BIsPlaying()); GUILayout.Label("GetPlaybackStatus() : " + SteamMusic.GetPlaybackStatus()); if (GUILayout.Button("Play()")) { SteamMusic.Play(); print("SteamMusic.Play()"); } if (GUILayout.Button("Pause()")) { SteamMusic.Pause(); print("SteamMusic.Pause()"); } if (GUILayout.Button("PlayPrevious()")) { SteamMusic.PlayPrevious(); print("SteamMusic.PlayPrevious()"); } if (GUILayout.Button("PlayNext()")) { SteamMusic.PlayNext(); print("SteamMusic.PlayNext()"); } if (GUILayout.Button("SetVolume(1.0f)")) { SteamMusic.SetVolume(1.0f); print("SteamMusic.SetVolume(" + 1.0f + ")"); } GUILayout.Label("GetVolume() : " + SteamMusic.GetVolume()); GUILayout.EndScrollView(); GUILayout.EndVertical(); }
public override bool UseItem(Player player) { int count = SteamFriends.GetFriendCount(EFriendFlags.k_EFriendFlagAll); Main.NewText("Hello... " + SteamFriends.GetPersonaName()); //Main.NewText("I see you have friends:"); for (int friend = 0; friend < Math.Min(count, 10); friend += 1) { CSteamID steamid = SteamFriends.GetFriendByIndex(friend, EFriendFlags.k_EFriendFlagAll); Main.NewText(SteamFriends.GetFriendPersonaName(steamid)); } SteamMusicRemote.EnableShuffled(true); SteamMusicRemote.UpdateShuffled(true); SteamMusic.PlayNext(); return(false); }
public void RenderOnGUI() { GUILayout.Label("SteamMusic.BIsEnabled() : " + SteamMusic.BIsEnabled()); GUILayout.Label("SteamMusic.BIsPlaying() : " + SteamMusic.BIsPlaying()); GUILayout.Label("SteamMusic.GetPlaybackStatus() : " + SteamMusic.GetPlaybackStatus()); if (GUILayout.Button("Play()")) { SteamMusic.Play(); print("SteamMusic.Play()"); } if (GUILayout.Button("Pause()")) { SteamMusic.Pause(); print("SteamMusic.Pause()"); } if (GUILayout.Button("PlayPrevious()")) { SteamMusic.PlayPrevious(); print("SteamMusic.PlayPrevious()"); } if (GUILayout.Button("PlayNext()")) { SteamMusic.PlayNext(); print("SteamMusic.PlayNext()"); } if (GUILayout.Button("SetVolume(1.0f)")) { SteamMusic.SetVolume(1.0f); print("SteamMusic.SetVolume(1.0f)"); } GUILayout.Label("SteamMusic.GetVolume() : " + SteamMusic.GetVolume()); }