-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mute Unmute -> turn off local audio source
This shout the local audio source of the corresponding remote player
- Loading branch information
Showing
8 changed files
with
418 additions
and
2,090 deletions.
There are no files selected for viewing
2,276 changes: 241 additions & 2,035 deletions
2,276
Assets/Prefabs/PopUps/PopUpWindow_RoomOptions.prefab
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright 2023 The Open Brush Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using UnityEngine; | ||
|
||
namespace TiltBrush | ||
{ | ||
public class MultiplayerRoomOptionsPanelButton : OptionButton | ||
{ | ||
[SerializeField] private bool m_CommandIgnored = false; | ||
[HideInInspector] public int playerId; | ||
|
||
override protected void OnButtonPressed() | ||
{ | ||
|
||
MultiplayerRoomOptionsPopUpWindow popup = m_Manager.GetComponent<MultiplayerRoomOptionsPopUpWindow>(); | ||
|
||
// For some circumstances on mobile, we want to ignore the command, but still | ||
// notify the popup that we were pressed. Which happens below. | ||
if (!m_CommandIgnored) | ||
{ | ||
if (m_RequiresPopup & m_Command == SketchControlsScript.GlobalCommands.MuteUserInMultiplayer) | ||
{ | ||
|
||
} | ||
|
||
base.OnButtonPressed(); | ||
} | ||
|
||
|
||
Debug.Assert(popup != null); | ||
popup.OnMultiplayerRoomOptionsPopUpWindowButtonPressed(this); | ||
} | ||
} | ||
} // namespace TiltBrush |
11 changes: 11 additions & 0 deletions
11
Assets/Scripts/GUI/MultiplayerRoomOptionsPanelButton.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
// Copyright 2023 The Open Brush Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using OpenBrush.Multiplayer; | ||
using TMPro; | ||
using UnityEngine; | ||
|
||
public class PlayerListItemPrefab : MonoBehaviour | ||
namespace TiltBrush | ||
{ | ||
public TextMeshPro PlayerId; | ||
public TextMeshPro NickName; | ||
public RemotePlayer remotePlayer; | ||
|
||
public void SetRemotePlayer(RemotePlayer Player) | ||
public class PlayerListItemPrefab : MonoBehaviour | ||
{ | ||
remotePlayer = Player; | ||
SetPlayerId(); | ||
SetNickname(); | ||
} | ||
public TextMeshPro PlayerIdObject; | ||
public TextMeshPro NickNameObject; | ||
public MultiplayerRoomOptionsPanelButton MuteButton; | ||
public RemotePlayer remotePlayer; | ||
|
||
public void SetNickname() { NickName.text = remotePlayer.Nickname; } | ||
public void SetPlayerId() { PlayerId.text = remotePlayer.PlayerId.ToString(); } | ||
public void SetRemotePlayer(RemotePlayer Player) | ||
{ | ||
remotePlayer = Player; | ||
SetPlayerId(); | ||
SetNickname(); | ||
} | ||
|
||
public void SetNickname() { NickNameObject.text = remotePlayer.Nickname; } | ||
public void SetPlayerId() | ||
{ | ||
PlayerIdObject.text = remotePlayer.PlayerId.ToString(); | ||
MuteButton.playerId = remotePlayer.PlayerId; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters