remove admin indicator icon to avoid confusion/overlapping
print admin names in bold text instead
This commit is contained in:
@@ -399,6 +399,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{ // Non-editable player in slot
|
{ // Non-editable player in slot
|
||||||
template = NonEditablePlayerTemplate.Clone();
|
template = NonEditablePlayerTemplate.Clone();
|
||||||
template.Get<LabelWidget>("NAME").GetText = () => client.Name;
|
template.Get<LabelWidget>("NAME").GetText = () => client.Name;
|
||||||
|
if (client.IsAdmin)
|
||||||
|
template.Get<LabelWidget>("NAME").Font = "Bold";
|
||||||
var color = template.Get<ColorBlockWidget>("COLOR");
|
var color = template.Get<ColorBlockWidget>("COLOR");
|
||||||
color.GetColor = () => client.ColorRamp.GetColor(0);
|
color.GetColor = () => client.ColorRamp.GetColor(0);
|
||||||
|
|
||||||
@@ -421,8 +423,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + client.Index));
|
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + client.Index));
|
||||||
}
|
}
|
||||||
|
|
||||||
template.Get<ImageWidget>("ISADMIN").IsVisible = () => client != null && client.IsAdmin;
|
|
||||||
|
|
||||||
template.IsVisible = () => true;
|
template.IsVisible = () => true;
|
||||||
Players.AddChild(template);
|
Players.AddChild(template);
|
||||||
}
|
}
|
||||||
@@ -458,6 +458,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
template = NonEditableSpectatorTemplate.Clone();
|
template = NonEditableSpectatorTemplate.Clone();
|
||||||
template.Get<LabelWidget>("NAME").GetText = () => c.Name;
|
template.Get<LabelWidget>("NAME").GetText = () => c.Name;
|
||||||
|
if (client.IsAdmin)
|
||||||
|
template.Get<LabelWidget>("NAME").Font = "Bold";
|
||||||
var color = template.Get<ColorBlockWidget>("COLOR");
|
var color = template.Get<ColorBlockWidget>("COLOR");
|
||||||
color.GetColor = () => c.ColorRamp.GetColor(0);
|
color.GetColor = () => c.ColorRamp.GetColor(0);
|
||||||
|
|
||||||
@@ -469,8 +471,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + c.Index));
|
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + c.Index));
|
||||||
}
|
}
|
||||||
|
|
||||||
template.Get<ImageWidget>("ISADMIN").IsVisible = () => c.IsAdmin;
|
|
||||||
|
|
||||||
template.IsVisible = () => true;
|
template.IsVisible = () => true;
|
||||||
Players.AddChild(template);
|
Players.AddChild(template);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
public static void SetupNameWidget(OrderManager orderManager, Session.Client c, TextFieldWidget name)
|
public static void SetupNameWidget(OrderManager orderManager, Session.Client c, TextFieldWidget name)
|
||||||
{
|
{
|
||||||
|
if (c.IsAdmin)
|
||||||
|
name.Font = "Bold";
|
||||||
name.Text = c.Name;
|
name.Text = c.Name;
|
||||||
name.OnEnterKey = () =>
|
name.OnEnterKey = () =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -451,6 +451,3 @@ order-icons: chrome.png
|
|||||||
repair: 384,48,16,16
|
repair: 384,48,16,16
|
||||||
repair-disabled: 384,64,16,16
|
repair-disabled: 384,64,16,16
|
||||||
repair-active: 384,80,16,16
|
repair-active: 384,80,16,16
|
||||||
|
|
||||||
misc: misc.png
|
|
||||||
isadmin: 0,0,10,15
|
|
||||||
|
|||||||
@@ -63,13 +63,6 @@ Container@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
Visible:false
|
Visible:false
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:192
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@BOT_DROPDOWN:
|
DropDownButton@BOT_DROPDOWN:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:205
|
Width:205
|
||||||
@@ -138,13 +131,6 @@ Container@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:192
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
@@ -208,13 +194,6 @@ Container@SERVER_LOBBY:
|
|||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Visible:false
|
Visible:false
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:192
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@JOIN:
|
Button@JOIN:
|
||||||
Text:Play in this slot
|
Text:Play in this slot
|
||||||
Font:Regular
|
Font:Regular
|
||||||
@@ -234,13 +213,6 @@ Container@SERVER_LOBBY:
|
|||||||
Width:205
|
Width:205
|
||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:192
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@COLOR:
|
DropDownButton@COLOR:
|
||||||
Width:70
|
Width:70
|
||||||
Height:25
|
Height:25
|
||||||
@@ -279,13 +251,6 @@ Container@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:192
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 290 B |
@@ -540,6 +540,3 @@ scrollitem-hover: dialog.png
|
|||||||
corner-tr: 594,0,1,1
|
corner-tr: 594,0,1,1
|
||||||
corner-bl: 512,82,1,1
|
corner-bl: 512,82,1,1
|
||||||
corner-br: 594,82,1,1
|
corner-br: 594,82,1,1
|
||||||
|
|
||||||
misc: misc.png
|
|
||||||
isadmin: 0,0,16,16
|
|
||||||
|
|||||||
@@ -48,13 +48,6 @@ Background@SERVER_LOBBY:
|
|||||||
X:0
|
X:0
|
||||||
Y:0
|
Y:0
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@BOT_DROPDOWN:
|
DropDownButton@BOT_DROPDOWN:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:150
|
Width:150
|
||||||
@@ -123,13 +116,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
@@ -188,13 +174,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@NAME_HOST:
|
DropDownButton@NAME_HOST:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:150
|
Width:150
|
||||||
@@ -220,13 +199,6 @@ Background@SERVER_LOBBY:
|
|||||||
Width:150
|
Width:150
|
||||||
Height:25
|
Height:25
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@COLOR:
|
DropDownButton@COLOR:
|
||||||
Width:80
|
Width:80
|
||||||
Height:25
|
Height:25
|
||||||
@@ -273,13 +245,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
|
|||||||
@@ -522,7 +522,4 @@ scrollitem-hover: dialog.png
|
|||||||
corner-tl: 512,0,1,1
|
corner-tl: 512,0,1,1
|
||||||
corner-tr: 594,0,1,1
|
corner-tr: 594,0,1,1
|
||||||
corner-bl: 512,82,1,1
|
corner-bl: 512,82,1,1
|
||||||
corner-br: 594,82,1,1
|
corner-br: 594,82,1,1
|
||||||
|
|
||||||
misc: misc.png
|
|
||||||
isadmin: 0,0,10,15
|
|
||||||
@@ -48,13 +48,6 @@ Background@SERVER_LOBBY:
|
|||||||
X:0
|
X:0
|
||||||
Y:0
|
Y:0
|
||||||
MaxLength:16
|
MaxLength:16
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
DropDownButton@BOT_DROPDOWN:
|
DropDownButton@BOT_DROPDOWN:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:150
|
Width:150
|
||||||
@@ -123,13 +116,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
@@ -201,13 +187,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:160
|
X:160
|
||||||
Y:0
|
Y:0
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Container@TEMPLATE_EDITABLE_SPECTATOR:
|
Container@TEMPLATE_EDITABLE_SPECTATOR:
|
||||||
X:5
|
X:5
|
||||||
Y:0
|
Y:0
|
||||||
@@ -252,13 +231,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:20
|
Height:20
|
||||||
ImageCollection:checkbox-bits
|
ImageCollection:checkbox-bits
|
||||||
ImageName:checked
|
ImageName:checked
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:150
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
|
|
||||||
Container@TEMPLATE_NONEDITABLE_SPECTATOR:
|
Container@TEMPLATE_NONEDITABLE_SPECTATOR:
|
||||||
X:5
|
X:5
|
||||||
@@ -273,13 +245,6 @@ Background@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
X:5
|
X:5
|
||||||
Y:0-1
|
Y:0-1
|
||||||
Image@ISADMIN:
|
|
||||||
Width:16
|
|
||||||
Height:16
|
|
||||||
X:130
|
|
||||||
Y:4
|
|
||||||
ImageName:isadmin
|
|
||||||
ImageCollection:misc
|
|
||||||
Button@KICK:
|
Button@KICK:
|
||||||
Text:X
|
Text:X
|
||||||
Width:25
|
Width:25
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 290 B |
Reference in New Issue
Block a user