Set spectator color to white & remove selector.
This commit is contained in:
@@ -137,6 +137,7 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
{
|
{
|
||||||
client.Slot = null;
|
client.Slot = null;
|
||||||
client.SpawnPoint = 0;
|
client.SpawnPoint = 0;
|
||||||
|
client.Color = HSLColor.FromRGB(255, 255, 255);
|
||||||
server.SyncLobbyInfo();
|
server.SyncLobbyInfo();
|
||||||
return true;
|
return true;
|
||||||
}},
|
}},
|
||||||
@@ -530,8 +531,8 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
if (targetClient.Index != client.Index && !client.IsAdmin)
|
if (targetClient.Index != client.Index && !client.IsAdmin)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Map has disabled color changes
|
// Spectator or map has disabled color changes
|
||||||
if (targetClient.Slot != null && server.lobbyInfo.Slots[targetClient.Slot].LockColor)
|
if (targetClient.Slot == null || server.lobbyInfo.Slots[targetClient.Slot].LockColor)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
var ci = parts[1].Split(',').Select(cc => int.Parse(cc)).ToArray();
|
var ci = parts[1].Split(',').Select(cc => int.Parse(cc)).ToArray();
|
||||||
|
|||||||
@@ -459,7 +459,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
template = EditableSpectatorTemplate.Clone();
|
template = EditableSpectatorTemplate.Clone();
|
||||||
|
|
||||||
LobbyUtils.SetupEditableNameWidget(template, null, c, orderManager);
|
LobbyUtils.SetupEditableNameWidget(template, null, c, orderManager);
|
||||||
LobbyUtils.SetupEditableColorWidget(template, null, c, orderManager, colorPreview);
|
|
||||||
}
|
}
|
||||||
// Non-editable spectator
|
// Non-editable spectator
|
||||||
else
|
else
|
||||||
@@ -469,7 +468,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
LobbyUtils.SetupNameWidget(template, null, client);
|
LobbyUtils.SetupNameWidget(template, null, client);
|
||||||
LobbyUtils.SetupKickWidget(template, null, client, orderManager);
|
LobbyUtils.SetupKickWidget(template, null, client, orderManager);
|
||||||
LobbyUtils.SetupColorWidget(template, null, client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LobbyUtils.SetupClientWidget(template, null, c, orderManager, true);
|
LobbyUtils.SetupClientWidget(template, null, c, orderManager, true);
|
||||||
|
|||||||
@@ -295,23 +295,11 @@ Container@SERVER_LOBBY:
|
|||||||
Width:190
|
Width:190
|
||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
DropDownButton@COLOR:
|
|
||||||
Width:70
|
|
||||||
Height:25
|
|
||||||
X:210
|
|
||||||
Font:Regular
|
|
||||||
IgnoreChildMouseOver: true
|
|
||||||
Children:
|
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:5
|
|
||||||
Y:6
|
|
||||||
Width:PARENT_RIGHT-35
|
|
||||||
Height:PARENT_BOTTOM-12
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:250
|
Width:315-55
|
||||||
Height:25
|
Height:25
|
||||||
X:255
|
X:210
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
@@ -358,16 +346,11 @@ Container@SERVER_LOBBY:
|
|||||||
X:180
|
X:180
|
||||||
Y:2
|
Y:2
|
||||||
Font:Bold
|
Font:Bold
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:215
|
|
||||||
Y:6
|
|
||||||
Width:35
|
|
||||||
Height:13
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:250
|
Width:315-55
|
||||||
Height:25
|
Height:25
|
||||||
X:255
|
X:210
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
|||||||
@@ -273,22 +273,11 @@ Background@SERVER_LOBBY:
|
|||||||
Width:135
|
Width:135
|
||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
DropDownButton@COLOR:
|
|
||||||
Width:80
|
|
||||||
Height:25
|
|
||||||
X:160
|
|
||||||
Font:Regular
|
|
||||||
Children:
|
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:5
|
|
||||||
Y:6
|
|
||||||
Width:PARENT_RIGHT-35
|
|
||||||
Height:PARENT_BOTTOM-12
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:225
|
Width:278
|
||||||
Height:25
|
Height:25
|
||||||
X:245
|
X:160
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
@@ -334,16 +323,11 @@ Background@SERVER_LOBBY:
|
|||||||
X:125
|
X:125
|
||||||
Y:2
|
Y:2
|
||||||
Font:Bold
|
Font:Bold
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:165
|
|
||||||
Y:6
|
|
||||||
Width:45
|
|
||||||
Height:13
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:225
|
Width:278
|
||||||
Height:25
|
Height:25
|
||||||
X:245
|
X:160
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
|||||||
@@ -273,22 +273,11 @@ Background@SERVER_LOBBY:
|
|||||||
Width:135
|
Width:135
|
||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
DropDownButton@COLOR:
|
|
||||||
Width:80
|
|
||||||
Height:25
|
|
||||||
X:160
|
|
||||||
Font:Regular
|
|
||||||
Children:
|
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:5
|
|
||||||
Y:6
|
|
||||||
Width:PARENT_RIGHT-35
|
|
||||||
Height:PARENT_BOTTOM-12
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:225
|
Width:278
|
||||||
Height:25
|
Height:25
|
||||||
X:245
|
X:160
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
@@ -334,16 +323,11 @@ Background@SERVER_LOBBY:
|
|||||||
X:125
|
X:125
|
||||||
Y:2
|
Y:2
|
||||||
Font:Bold
|
Font:Bold
|
||||||
ColorBlock@COLORBLOCK:
|
|
||||||
X:165
|
|
||||||
Y:6
|
|
||||||
Width:45
|
|
||||||
Height:13
|
|
||||||
Label@SPECTATOR:
|
Label@SPECTATOR:
|
||||||
Text:Spectator
|
Text:Spectator
|
||||||
Width:225
|
Width:278
|
||||||
Height:25
|
Height:25
|
||||||
X:245
|
X:160
|
||||||
Y:0
|
Y:0
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
|||||||
Reference in New Issue
Block a user