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;