Move the player bin header to lobby-players.yaml.

This commit is contained in:
Paul Chote
2015-10-04 17:26:32 +01:00
parent fb5a6d8ec0
commit b73f775ef2
6 changed files with 1043 additions and 988 deletions

View File

@@ -128,13 +128,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
});
UpdateCurrentMap();
players = Ui.LoadWidget<ScrollPanelWidget>("LOBBY_PLAYER_BIN", lobby.Get("PLAYER_BIN_ROOT"), new WidgetArgs());
players.IsVisible = () => panel == PanelType.Players;
var playerBinHeaders = lobby.GetOrNull<ContainerWidget>("LABEL_CONTAINER");
if (playerBinHeaders != null)
playerBinHeaders.IsVisible = () => panel == PanelType.Players;
var playerBin = Ui.LoadWidget("LOBBY_PLAYER_BIN", lobby.Get("PLAYER_BIN_ROOT"), new WidgetArgs());
playerBin.IsVisible = () => panel == PanelType.Players;
players = playerBin.Get<ScrollPanelWidget>("LOBBY_PLAYERS");
editablePlayerTemplate = players.Get("TEMPLATE_EDITABLE_PLAYER");
nonEditablePlayerTemplate = players.Get("TEMPLATE_NONEDITABLE_PLAYER");
emptySlotTemplate = players.Get("TEMPLATE_EMPTY");

View File

@@ -1,4 +1,53 @@
ScrollPanel@LOBBY_PLAYER_BIN:
Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 20
Y: 5
Children:
Label@NAME:
Width: 200
Height: 25
Text: Player
Align: Center
Font: Bold
Label@COLOR:
Width: 70
Height: 25
X: 210
Text: Color
Align: Center
Font: Bold
Label@FACTION:
Width: 100
Height: 25
X: 285
Text: Faction
Align: Center
Font: Bold
Label@TEAM:
Width: 50
Height: 25
X: 390
Text: Team
Align: Center
Font: Bold
Label@SPAWN:
X: 445
Width: 50
Height: 25
Text: Spawn
Align: Left
Font: Bold
Label@STATUS:
X: 501
Width: 20
Height: 25
Text: Ready
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 15
Y: 30
Width: 556
@@ -336,4 +385,3 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Height: 25
X: 210
Y: 0

View File

@@ -20,51 +20,6 @@ Container@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Container@LABEL_CONTAINER:
X: 20
Y: 5
Children:
Label@NAME:
Width: 200
Height: 25
Text: Player
Align: Center
Font: Bold
Label@COLOR:
Width: 70
Height: 25
X: 210
Text: Color
Align: Center
Font: Bold
Label@FACTION:
Width: 100
Height: 25
X: 285
Text: Faction
Align: Center
Font: Bold
Label@TEAM:
Width: 50
Height: 25
X: 390
Text: Team
Align: Center
Font: Bold
Label@SPAWN:
X: 445
Width: 50
Height: 25
Text: Spawn
Align: Left
Font: Bold
Label@STATUS:
X: 501
Width: 20
Height: 25
Text: Ready
Align: Left
Font: Bold
Container@PLAYER_BIN_ROOT:
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 15

View File

@@ -1,4 +1,54 @@
ScrollPanel@LOBBY_PLAYER_BIN:
Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 25
Y: 40
Children:
Label@LABEL_LOBBY_NAME:
X: 0
Width: 180
Height: 25
Text: Name
Align: Center
Font: Bold
Label@LABEL_LOBBY_COLOR:
X: 190
Width: 80
Height: 25
Text: Color
Align: Center
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 280
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 478
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 535
Width: 20
Height: 25
Text: Ready
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 20
Y: 67
TopBottomSpacing: 5

View File

@@ -1,4 +1,54 @@
ScrollPanel@LOBBY_PLAYER_BIN:
Container@LOBBY_PLAYER_BIN:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 25
Y: 40
Children:
Label@LABEL_LOBBY_NAME:
X: 0
Width: 180
Height: 25
Text: Name
Align: Center
Font: Bold
Label@LABEL_LOBBY_COLOR:
X: 190
Width: 80
Height: 25
Text: Color
Align: Center
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 280
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 478
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 535
Width: 20
Height: 25
Text: Ready
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 20
Y: 67
TopBottomSpacing: 5

View File

@@ -16,52 +16,6 @@ Background@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Container@LABEL_CONTAINER:
X: 25
Y: 40
Children:
Label@LABEL_LOBBY_NAME:
X: 0
Width: 180
Height: 25
Text: Name
Align: Center
Font: Bold
Label@LABEL_LOBBY_COLOR:
X: 190
Width: 80
Height: 25
Text: Color
Align: Center
Font: Bold
Label@LABEL_LOBBY_FACTION:
X: 280
Width: 130
Height: 25
Text: Faction
Align: Center
Font: Bold
Label@LABEL_LOBBY_TEAM:
X: 420
Width: 48
Height: 25
Text: Team
Align: Center
Font: Bold
Label@LABEL_LOBBY_SPAWN:
X: 478
Width: 48
Height: 25
Text: Spawn
Align: Center
Font: Bold
Label@LABEL_LOBBY_STATUS:
X: 535
Width: 20
Height: 25
Text: Ready
Align: Left
Font: Bold
Container@PLAYER_BIN_ROOT:
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 20