Skip to content

Commit

Permalink
Finish fixing OpenRA#2136
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Jun 26, 2012
1 parent c122e6f commit 984a498
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 8 deletions.
10 changes: 4 additions & 6 deletions OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs
Expand Up @@ -371,11 +371,10 @@ void UpdatePlayerList()
kickButton.IsVisible = () => Game.IsHost && client.Index != orderManager.LocalClient.Index;
kickButton.IsDisabled = () => orderManager.LocalClient.IsReady;
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + client.Index));

var isadmin = template.Get<ImageWidget>("ISADMIN");
isadmin.IsVisible = () => client.IsAdmin;
}

template.Get<ImageWidget>("ISADMIN").IsVisible = () => client != null && client.IsAdmin;

template.IsVisible = () => true;
Players.AddChild(template);
}
Expand Down Expand Up @@ -420,11 +419,10 @@ void UpdatePlayerList()
kickButton.IsVisible = () => Game.IsHost && c.Index != orderManager.LocalClient.Index;
kickButton.IsDisabled = () => orderManager.LocalClient.IsReady;
kickButton.OnClick = () => orderManager.IssueOrder(Order.Command("kick " + c.Index));

var isadmin = template.Get<ImageWidget>("ISADMIN");
isadmin.IsVisible = () => client.IsAdmin;
}

template.Get<ImageWidget>("ISADMIN").IsVisible = () => c.IsAdmin;

template.IsVisible = () => true;
Players.AddChild(template);
}
Expand Down
5 changes: 4 additions & 1 deletion mods/cnc/chrome.yaml
Expand Up @@ -450,4 +450,7 @@ order-icons: chrome.png
sell-active: 496,32,16,16
repair: 384,48,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,16,16
35 changes: 35 additions & 0 deletions mods/cnc/chrome/lobby.yaml
Expand Up @@ -61,6 +61,13 @@ Container@SERVER_LOBBY:
Height:25
MaxLength:16
Visible:false
Image@ISADMIN:
Width:16
Height:16
X:200
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@BOT_DROPDOWN:
Text:Name
Width:205
Expand Down Expand Up @@ -129,6 +136,13 @@ Container@SERVER_LOBBY:
Height:25
X:5
Y:0-1
Image@ISADMIN:
Width:16
Height:16
X:200
Y:4
ImageName:isadmin
ImageCollection:misc
Button@KICK:
Text:X
Width:25
Expand Down Expand Up @@ -192,6 +206,13 @@ Container@SERVER_LOBBY:
X:5
Y:0-1
Visible:false
Image@ISADMIN:
Width:16
Height:16
X:200
Y:4
ImageName:isadmin
ImageCollection:misc
Button@JOIN:
Text:Play in this slot
Font:Regular
Expand All @@ -211,6 +232,13 @@ Container@SERVER_LOBBY:
Width:205
Height:25
MaxLength:16
Image@ISADMIN:
Width:16
Height:16
X:200
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@COLOR:
Width:70
Height:25
Expand Down Expand Up @@ -249,6 +277,13 @@ Container@SERVER_LOBBY:
Height:25
X:5
Y:0-1
Image@ISADMIN:
Width:16
Height:16
X:200
Y:4
ImageName:isadmin
ImageCollection:misc
Button@KICK:
Text:X
Width:25
Expand Down
5 changes: 4 additions & 1 deletion mods/d2k/chrome.yaml
Expand Up @@ -539,4 +539,7 @@ scrollitem-hover: dialog.png
corner-tl: 512,0,1,1
corner-tr: 594,0,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
35 changes: 35 additions & 0 deletions mods/d2k/chrome/lobby.yaml
Expand Up @@ -46,6 +46,13 @@ Background@SERVER_LOBBY:
X:0
Y:0
MaxLength:16
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@BOT_DROPDOWN:
Text:Name
Width:150
Expand Down Expand Up @@ -114,6 +121,13 @@ Background@SERVER_LOBBY:
Height:25
X:5
Y:0-1
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
Button@KICK:
Text:X
Width:25
Expand Down Expand Up @@ -172,6 +186,13 @@ Background@SERVER_LOBBY:
Height:25
X:5
Y:0-1
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@NAME_HOST:
Text:Name
Width:150
Expand All @@ -197,6 +218,13 @@ Background@SERVER_LOBBY:
Width:150
Height:25
MaxLength:16
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@COLOR:
Width:80
Height:25
Expand Down Expand Up @@ -243,6 +271,13 @@ Background@SERVER_LOBBY:
Height:25
X:5
Y:0-1
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
Button@KICK:
Text:X
Width:25
Expand Down
21 changes: 21 additions & 0 deletions mods/ra/chrome/lobby.yaml
Expand Up @@ -46,6 +46,13 @@ Background@SERVER_LOBBY:
X:0
Y:0
MaxLength:16
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
DropDownButton@BOT_DROPDOWN:
Text:Name
Width:150
Expand Down Expand Up @@ -192,6 +199,13 @@ Background@SERVER_LOBBY:
Height:25
X:160
Y:0
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc
Container@TEMPLATE_EDITABLE_SPECTATOR:
X:5
Y:0
Expand Down Expand Up @@ -236,6 +250,13 @@ Background@SERVER_LOBBY:
Height:20
ImageCollection:checkbox-bits
ImageName:checked
Image@ISADMIN:
Width:16
Height:16
X:150
Y:4
ImageName:isadmin
ImageCollection:misc

Container@TEMPLATE_NONEDITABLE_SPECTATOR:
X:5
Expand Down

0 comments on commit 984a498

Please sign in to comment.