Inherit lobby bin size from the root.

This commit is contained in:
Paul Chote
2015-10-04 17:26:38 +01:00
parent b73f775ef2
commit c6740b1bcb
12 changed files with 51 additions and 80 deletions

View File

@@ -129,7 +129,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
UpdateCurrentMap();
var playerBin = Ui.LoadWidget("LOBBY_PLAYER_BIN", lobby.Get("PLAYER_BIN_ROOT"), new WidgetArgs());
var playerBin = Ui.LoadWidget("LOBBY_PLAYER_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs());
playerBin.IsVisible = () => panel == PanelType.Players;
players = playerBin.Get<ScrollPanelWidget>("LOBBY_PLAYERS");
@@ -273,7 +273,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
}
var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby, new WidgetArgs());
var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs());
optionsBin.IsVisible = () => panel == PanelType.Options;
var optionsButton = lobby.Get<ButtonWidget>("OPTIONS_BUTTON");
@@ -303,7 +303,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
}
var forceStartBin = Ui.LoadWidget("FORCE_START_DIALOG", lobby, new WidgetArgs());
var forceStartBin = Ui.LoadWidget("FORCE_START_DIALOG", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs());
forceStartBin.IsVisible = () => panel == PanelType.ForceStart;
forceStartBin.Get("KICK_WARNING").IsVisible = () => orderManager.LobbyInfo.Clients.Any(c => c.IsInvalid);
forceStartBin.Get<ButtonWidget>("OK_BUTTON").OnClick = startGame;

View File

@@ -330,7 +330,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
before();
Game.LoadWidget(null, "KICK_CLIENT_DIALOG", lobby, new WidgetArgs
Game.LoadWidget(null, "KICK_CLIENT_DIALOG", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs
{
{ "clientName", c.Name },
{ "okPressed", okPressed },
@@ -364,7 +364,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var spectatorCount = orderManager.LobbyInfo.Clients.Count(c => c.IsObserver);
if (spectatorCount > 0)
{
Game.LoadWidget(null, "KICK_SPECTATORS_DIALOG", lobby, new WidgetArgs
Game.LoadWidget(null, "KICK_SPECTATORS_DIALOG", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs
{
{ "clientCount", "{0}".F(spectatorCount) },
{ "okPressed", okPressed },

View File

@@ -1,20 +1,16 @@
Background@KICK_CLIENT_DIALOG:
X: 15
Y: 30
Width: 501
Height: 219
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Logic: KickClientLogic
Background: scrollpanel-bg
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
@@ -22,7 +18,6 @@ Background@KICK_CLIENT_DIALOG:
Align: Center
Text: You may also apply a temporary ban, preventing
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
@@ -51,15 +46,12 @@ Background@KICK_CLIENT_DIALOG:
Text: Cancel
Font: Bold
Background@KICK_SPECTATORS_DIALOG:
X: 15
Y: 30
Width: 501
Height: 219
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Logic: KickSpectatorsLogic
Background: scrollpanel-bg
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
@@ -67,7 +59,6 @@ Background@KICK_SPECTATORS_DIALOG:
Align: Center
Text: Kick Spectators
Label@TEXT:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
@@ -88,14 +79,11 @@ Background@KICK_SPECTATORS_DIALOG:
Text: Cancel
Font: Bold
Background@FORCE_START_DIALOG:
X: 15
Y: 30
Width: 556
Height: 219
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
@@ -103,7 +91,6 @@ Background@FORCE_START_DIALOG:
Align: Center
Text: Start Game?
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
@@ -111,7 +98,6 @@ Background@FORCE_START_DIALOG:
Align: Center
Text: One or more players are not yet ready.
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25

View File

@@ -1,12 +1,9 @@
Background@LOBBY_OPTIONS_BIN:
X: 15
Y: 30
Width: 556
Height: 219
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
Children:
Label@TITLE:
X: 0
Y: 0 - 25
Width: PARENT_RIGHT
Height: 25

View File

@@ -3,8 +3,10 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 20
Y: 5
X: 5
Y: 0-25
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@NAME:
Width: 200
@@ -48,10 +50,8 @@ Container@LOBBY_PLAYER_BIN:
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 15
Y: 30
Width: 556
Height: 219
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
TopBottomSpacing: 5
ItemSpacing: 5
Children:

View File

@@ -20,7 +20,11 @@ Container@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Container@PLAYER_BIN_ROOT:
Container@TOP_PANELS_ROOT:
X: 15
Y: 30
Width: 556
Height: 219
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 15
Y: 254

View File

@@ -1,8 +1,6 @@
Background@LOBBY_OPTIONS_BIN:
X: 20
Y: 67
Width: 593
Height: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: dialog3
Children:
Label@TITLE:

View File

@@ -3,8 +3,10 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 25
Y: 40
X: 5
Y: 0-27
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@LABEL_LOBBY_NAME:
X: 0
@@ -49,12 +51,10 @@ Container@LOBBY_PLAYER_BIN:
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 20
Y: 67
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
TopBottomSpacing: 5
ItemSpacing: 5
Width: 593
Height: 235
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
X: 5

View File

@@ -1,20 +1,16 @@
Background@KICK_CLIENT_DIALOG:
X: 20
Y: 67
Width: 535
Height: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Logic: KickClientLogic
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
@@ -22,7 +18,6 @@ Background@KICK_CLIENT_DIALOG:
Align: Center
Text: You may also apply a temporary ban, preventing
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
@@ -51,15 +46,12 @@ Background@KICK_CLIENT_DIALOG:
Font: Bold
Background@KICK_SPECTATORS_DIALOG:
X: 20
Y: 67
Width: 535
Height: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Logic: KickSpectatorsLogic
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
@@ -67,7 +59,6 @@ Background@KICK_SPECTATORS_DIALOG:
Align: Center
Text: Kick Spectators
Label@TEXT:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
@@ -89,14 +80,11 @@ Background@KICK_SPECTATORS_DIALOG:
Font: Bold
Background@FORCE_START_DIALOG:
X: 20
Y: 67
Width: 593
Height: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: dialog3
Children:
Label@TITLE:
X: 0
Y: 40
Width: PARENT_RIGHT
Height: 25
@@ -104,7 +92,6 @@ Background@FORCE_START_DIALOG:
Align: Center
Text: Start Game?
Label@TEXTA:
X: 0
Y: 67
Width: PARENT_RIGHT
Height: 25
@@ -112,7 +99,6 @@ Background@FORCE_START_DIALOG:
Align: Center
Text: One or more players are not yet ready.
Label@TEXTB:
X: 0
Y: 85
Width: PARENT_RIGHT
Height: 25
@@ -123,7 +109,6 @@ Background@FORCE_START_DIALOG:
Width: PARENT_RIGHT
Children:
Label@KICK_WARNING_A:
X: 0
Y: 106
Width: PARENT_RIGHT
Height: 25
@@ -131,7 +116,6 @@ Background@FORCE_START_DIALOG:
Align: Center
Text: One or more clients are missing the selected
Label@KICK_WARNING_B:
X: 0
Y: 123
Width: PARENT_RIGHT
Height: 25

View File

@@ -1,8 +1,6 @@
Background@LOBBY_OPTIONS_BIN:
X: 20
Y: 67
Width: 593
Height: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: dialog3
Children:
Label@TITLE:

View File

@@ -3,8 +3,10 @@ Container@LOBBY_PLAYER_BIN:
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
X: 25
Y: 40
X: 5
Y: 0-27
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@LABEL_LOBBY_NAME:
X: 0
@@ -49,12 +51,10 @@ Container@LOBBY_PLAYER_BIN:
Align: Left
Font: Bold
ScrollPanel@LOBBY_PLAYERS:
X: 20
Y: 67
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
TopBottomSpacing: 5
ItemSpacing: 5
Width: 593
Height: 235
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
X: 5

View File

@@ -16,7 +16,11 @@ Background@SERVER_LOBBY:
Container@MAP_PREVIEW_ROOT:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Container@PLAYER_BIN_ROOT:
Container@TOP_PANELS_ROOT:
X: 20
Y: 67
Width: 593
Height: 235
DropDownButton@SLOTS_DROPDOWNBUTTON:
X: 20
Y: PARENT_BOTTOM - 291