1class PlayerListEntryScriptedWidget
extends ScriptedWidgetEventHandler
4 protected string m_UID;
6 protected bool m_GlobalMute;
9 protected TextWidget m_PlayerName;
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 );
25 m_PlayerName = TextWidget.Cast(
m_Root.FindAnyWidget(
"Name" ) );
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()
42 Widget GetButtonWidget()
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 )
117 SetFocus( m_PlayerButton );
125 override bool OnMouseLeave( Widget w, Widget enterW,
int x,
int y )
127 #ifdef PLATFORM_CONSOLE
128 if( w == m_PlayerButton )
139 SetFocus(m_PlayerButton);
142 override bool OnFocus( Widget w,
int x,
int y )
146 #ifdef PLATFORM_CONSOLE
147 if( w == m_PlayerButton )
159 #ifdef PLATFORM_CONSOLE
160 if( w == m_PlayerButton )
170 if( button ==
MouseState.LEFT &&
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer() )
172 if( !IsLocalPlayer() )
182 if( button ==
MouseState.LEFT &&
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer() )
184 if( w == m_MicrophoneIcon && !m_GlobalMute )
196 if(
GetGame().GetUserManager() )
203 void Select(
bool notify =
true )
209 m_Tab.SelectPlayer(
this );
override bool OnMouseEnter(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
EBiosPrivacyPermission
EBiosPrivacyPermission represents possible privacy permissions.
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
BiosPrivacyPermissionResult represents the per permission result of the GetPermissionsAsync reqeust.
proto native BiosUserManager GetUserManager()
static void ShowUserProfile(string uid)
static bool MutePlayer(string id, bool mute)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
override bool OnDoubleClick(Widget w, int x, int y, int button)
override bool OnFocusLost(Widget w, int x, int y)
override bool OnFocus(Widget w, int x, int y)