4 protected string m_UID;
6 protected bool m_GlobalMute;
10 protected ImageWidget m_PlayerAvatar;
11 protected ImageWidget m_MicrophoneIcon;
12 protected ImageWidget m_MuteIcon;
13 protected ButtonWidget m_PlayerButton;
15 protected PlayerListScriptedWidget m_Tab;
16 protected bool m_Selected;
18 void PlayerListEntryScriptedWidget(
Widget parent,
string name,
string uid,
bool show_permissions, PlayerListScriptedWidget tab )
24 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/xbox/ingamemenu_xbox/player_info_entry.layout", parent );
26 m_PlayerAvatar = ImageWidget.Cast(
m_Root.FindAnyWidget(
"Avatar" ) );
27 m_MicrophoneIcon = ImageWidget.Cast(
m_Root.FindAnyWidget(
"Microphone" ) );
28 m_MuteIcon = ImageWidget.Cast(
m_Root.FindAnyWidget(
"Muted" ) );
29 m_PlayerButton = ButtonWidget.Cast(
m_Root.FindAnyWidget(
"Button" ) );
31 m_MicrophoneIcon.Show( show_permissions && !IsLocalPlayer() );
33 m_PlayerName.SetText(
name );
37 void ~PlayerListEntryScriptedWidget()
44 return m_PlayerButton;
53 m_GlobalMute = !result.m_IsAllowed;
54 if ( result.m_IsAllowed && !m_Mute )
56 m_MuteIcon.Show(
false );
58 else if ( !result.m_IsAllowed || m_Mute )
60 m_MuteIcon.Show(
true );
76 bool IsGloballyMuted()
81 void SetMute(
bool mute )
84 m_MuteIcon.Show( mute );
89 if( !IsLocalPlayer() && !
GetGame().GetWorld().IsDisabledReceivingVoN() )
95 m_MuteIcon.Show( m_Mute );
99 m_MuteIcon.Show(
true );
104 m_MicrophoneIcon.Show(
false );
105 m_MuteIcon.Show(
false );
113 #ifdef PLATFORM_CONSOLE
114 if( w == m_PlayerButton )
127 #ifdef PLATFORM_CONSOLE
128 if( w == m_PlayerButton )
146 #ifdef PLATFORM_CONSOLE
147 if( w == m_PlayerButton )
159 #ifdef PLATFORM_CONSOLE
160 if( w == m_PlayerButton )
172 if( !IsLocalPlayer() )
184 if( w == m_MicrophoneIcon && !m_GlobalMute )
196 if(
GetGame().GetUserManager() )
198 return GetGame().GetUserManager().GetSelectedUser().GetUid() == m_UID;
203 void Select(
bool notify =
true )
209 m_Tab.SelectPlayer(
this );