Overhaul lobby layout.

This commit is contained in:
Paul Chote
2013-06-30 18:20:44 +12:00
parent a49bf40413
commit 47406d8765
11 changed files with 396 additions and 280 deletions

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
class KickClientLogic
{
[ObjectCreator.UseCtor]
public KickClientLogic(Widget widget, string clientName, Action<bool> okPressed)
public KickClientLogic(Widget widget, string clientName, Action<bool> okPressed, Action cancelPressed)
{
widget.Get<LabelWidget>("TITLE").GetText = () => "Kick {0}?".F(clientName);
@@ -31,7 +31,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
okPressed(tempBan);
};
widget.Get<ButtonWidget>("CANCEL_BUTTON").OnClick = () => widget.Parent.RemoveChild(widget);
widget.Get<ButtonWidget>("CANCEL_BUTTON").OnClick = () =>
{
widget.Parent.RemoveChild(widget);
cancelPressed();
};
}
}
}

View File

@@ -20,6 +20,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
public class LobbyLogic
{
enum PanelType { Players, Options, Kick }
PanelType panel = PanelType.Players;
Widget lobby;
Widget EditablePlayerTemplate, NonEditablePlayerTemplate, EmptySlotTemplate,
EditableSpectatorTemplate, NonEditableSpectatorTemplate, NewSpectatorTemplate;
@@ -37,8 +40,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
readonly Action onExit;
readonly OrderManager orderManager;
public bool TeamGame;
// Listen for connection failures
void ConnectionStateChanged(OrderManager om)
{
@@ -103,6 +104,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
UpdateCurrentMap();
Players = Ui.LoadWidget<ScrollPanelWidget>("LOBBY_PLAYER_BIN", lobby, new WidgetArgs());
Players.IsVisible = () => panel == PanelType.Players;
EditablePlayerTemplate = Players.Get("TEMPLATE_EDITABLE_PLAYER");
NonEditablePlayerTemplate = Players.Get("TEMPLATE_NONEDITABLE_PLAYER");
EmptySlotTemplate = Players.Get("TEMPLATE_EMPTY");
@@ -145,8 +148,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
CountryNames.Add("random", "Any");
var gameStarting = false;
Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting || panel == PanelType.Kick ||
orderManager.LocalClient == null || orderManager.LocalClient.IsReady;
var mapButton = lobby.Get<ButtonWidget>("CHANGEMAP_BUTTON");
var mapButton = lobby.GetOrNull<ButtonWidget>("CHANGEMAP_BUTTON");
if (mapButton != null)
{
mapButton.IsDisabled = configurationDisabled;
mapButton.OnClick = () =>
{
var onSelect = new Action<Map>(m =>
@@ -163,13 +171,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{ "onSelect", onSelect }
});
};
mapButton.IsVisible = () => mapButton.Visible && Game.IsHost;
}
var slotsButton = lobby.GetOrNull<DropDownButtonWidget>("SLOTS_DROPDOWNBUTTON");
if (slotsButton != null)
{
slotsButton.IsDisabled = () => !Game.IsHost || gameStarting || orderManager.LocalClient == null ||
orderManager.LocalClient.IsReady || !orderManager.LobbyInfo.Slots.Values.Any(s => s.AllowBots || !s.LockTeam);
slotsButton.IsDisabled = () => configurationDisabled() || panel != PanelType.Players ||
!orderManager.LobbyInfo.Slots.Values.Any(s => s.AllowBots || !s.LockTeam);
var aiModes = Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name);
slotsButton.OnMouseDown = _ =>
@@ -213,7 +221,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
});
}
options.Add("Bots", botOptions);
options.Add("Configure Bots", botOptions);
}
var teamCount = (orderManager.LobbyInfo.Slots.Count(s => !s.Value.LockTeam && orderManager.LobbyInfo.ClientInSlot(s.Key) != null) + 1) / 2;
@@ -226,7 +234,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
OnClick = () => orderManager.IssueOrder(Order.Command("assignteams {0}".F(d.ToString())))
});
options.Add("Teams", teamOptions);
options.Add("Configure Teams", teamOptions);
}
Func<DropDownOption, ScrollItemWidget, ScrollItemWidget> setupItem = (option, template) =>
@@ -239,42 +247,59 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
}
var disconnectButton = lobby.Get<ButtonWidget>("DISCONNECT_BUTTON");
disconnectButton.OnClick = () => { CloseWindow(); onExit(); };
var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby, new WidgetArgs());
optionsBin.IsVisible = () => panel == PanelType.Options;
var allowCheats = lobby.Get<CheckboxWidget>("ALLOWCHEATS_CHECKBOX");
var optionsButton = lobby.Get<ButtonWidget>("OPTIONS_BUTTON");
optionsButton.IsDisabled = () => panel == PanelType.Kick;
optionsButton.GetText = () => panel == PanelType.Options ? "Players" : "Options";
optionsButton.OnClick = () => panel = (panel == PanelType.Options) ? PanelType.Players : PanelType.Options;
var startGameButton = lobby.GetOrNull<ButtonWidget>("START_GAME_BUTTON");
if (startGameButton != null)
{
startGameButton.IsDisabled = () => configurationDisabled() ||
orderManager.LobbyInfo.Slots.Any(sl => sl.Value.Required && orderManager.LobbyInfo.ClientInSlot(sl.Key) == null);
startGameButton.OnClick = () =>
{
gameStarting = true;
orderManager.IssueOrder(Order.Command("startgame"));
};
}
// Options panel
var allowCheats = optionsBin.GetOrNull<CheckboxWidget>("ALLOWCHEATS_CHECKBOX");
if (allowCheats != null)
{
allowCheats.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.AllowCheats;
allowCheats.IsDisabled = () => !Game.IsHost || gameStarting || orderManager.LocalClient == null
|| orderManager.LocalClient.IsReady;
allowCheats.IsDisabled = configurationDisabled;
allowCheats.OnClick = () => orderManager.IssueOrder(Order.Command(
"allowcheats {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllowCheats)));
}
var crates = lobby.GetOrNull<CheckboxWidget>("CRATES_CHECKBOX");
var crates = optionsBin.GetOrNull<CheckboxWidget>("CRATES_CHECKBOX");
if (crates != null)
{
crates.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.Crates;
crates.IsDisabled = () => !Game.IsHost || gameStarting || orderManager.LocalClient == null
|| orderManager.LocalClient.IsReady; // maybe disable the checkbox if a map forcefully removes CrateDrop?
crates.IsDisabled = configurationDisabled;
crates.OnClick = () => orderManager.IssueOrder(Order.Command(
"crates {0}".F(!orderManager.LobbyInfo.GlobalSettings.Crates)));
}
var fragileAlliance = lobby.GetOrNull<CheckboxWidget>("FRAGILEALLIANCES_CHECKBOX");
var fragileAlliance = optionsBin.GetOrNull<CheckboxWidget>("FRAGILEALLIANCES_CHECKBOX");
if (fragileAlliance != null)
{
fragileAlliance.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.FragileAlliances;
fragileAlliance.IsDisabled = () => !Game.IsHost || gameStarting
|| orderManager.LocalClient == null || orderManager.LocalClient.IsReady;
fragileAlliance.IsDisabled = configurationDisabled;
fragileAlliance.OnClick = () => orderManager.IssueOrder(Order.Command(
"fragilealliance {0}".F(!orderManager.LobbyInfo.GlobalSettings.FragileAlliances)));
};
var difficulty = lobby.GetOrNull<DropDownButtonWidget>("DIFFICULTY_DROPDOWNBUTTON");
var difficulty = optionsBin.GetOrNull<DropDownButtonWidget>("DIFFICULTY_DROPDOWNBUTTON");
if (difficulty != null)
{
difficulty.IsVisible = () => Map != null && Map.Difficulties != null && Map.Difficulties.Any();
difficulty.IsDisabled = () => !Game.IsHost || gameStarting || orderManager.LocalClient == null || orderManager.LocalClient.IsReady;
difficulty.IsDisabled = configurationDisabled;
difficulty.GetText = () => orderManager.LobbyInfo.GlobalSettings.Difficulty;
difficulty.OnMouseDown = _ =>
{
@@ -292,17 +317,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
difficulty.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", options.Count() * 30, options, setupItem);
};
var difficultyDesc = optionsBin.GetOrNull<LabelWidget>("DIFFICULTY_DESC");
difficultyDesc.IsVisible = difficulty.IsVisible;
}
var startGameButton = lobby.Get<ButtonWidget>("START_GAME_BUTTON");
startGameButton.IsVisible = () => Game.IsHost;
startGameButton.IsDisabled = () => gameStarting
|| orderManager.LobbyInfo.Slots.Any(sl => sl.Value.Required && orderManager.LobbyInfo.ClientInSlot(sl.Key) == null);
startGameButton.OnClick = () =>
{
gameStarting = true;
orderManager.IssueOrder(Order.Command("startgame"));
};
var disconnectButton = lobby.Get<ButtonWidget>("DISCONNECT_BUTTON");
disconnectButton.OnClick = () => { CloseWindow(); onExit(); };
bool teamChat = false;
var chatLabel = lobby.Get<LabelWidget>("LABEL_CHATTYPE");
@@ -401,8 +422,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
void UpdatePlayerList()
{
var idx = 0;
TeamGame = false;
foreach (var kv in orderManager.LobbyInfo.Slots)
{
var key = kv.Key;
@@ -449,9 +468,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
LobbyUtils.SetupEditableFactionWidget(template, slot, client, orderManager, CountryNames);
LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, Map.GetSpawnPoints().Length);
LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager);
if (slot.LockTeam || client.Team > 0)
TeamGame = true;
}
else
{ // Non-editable player in slot
@@ -460,7 +476,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
LobbyUtils.SetupClientWidget(template, slot, client, orderManager, client.Bot == null);
LobbyUtils.SetupNameWidget(template, slot, client);
LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby);
LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby,
() => panel = PanelType.Kick, () => panel = PanelType.Players);
LobbyUtils.SetupColorWidget(template, slot, client);
LobbyUtils.SetupFactionWidget(template, slot, client, CountryNames);
LobbyUtils.SetupTeamWidget(template, slot, client);
@@ -502,7 +519,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
template = NonEditableSpectatorTemplate.Clone();
LobbyUtils.SetupNameWidget(template, null, client);
LobbyUtils.SetupKickWidget(template, null, client, orderManager, lobby);
LobbyUtils.SetupKickWidget(template, null, client, orderManager, lobby,
() => panel = PanelType.Kick, () => panel = PanelType.Players);
}
LobbyUtils.SetupClientWidget(template, null, c, orderManager, true);

View File

@@ -266,17 +266,23 @@ namespace OpenRA.Mods.RA.Widgets.Logic
slot.IsVisible = () => false;
}
public static void SetupKickWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, Widget lobby)
public static void SetupKickWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, Widget lobby, Action before, Action after)
{
var button = parent.Get<ButtonWidget>("KICK");
button.IsVisible = () => Game.IsHost && c.Index != orderManager.LocalClient.Index;
button.IsDisabled = () => orderManager.LocalClient.IsReady;
Action<bool> okPressed = tempBan => orderManager.IssueOrder(Order.Command("kick {0} {1}".F(c.Index, tempBan)));
button.OnClick = () => Game.LoadWidget(null, "KICK_CLIENT_DIALOG", lobby, new WidgetArgs
Action<bool> okPressed = tempBan => { orderManager.IssueOrder(Order.Command("kick {0} {1}".F(c.Index, tempBan))); after(); };
button.OnClick = () =>
{
before();
Game.LoadWidget(null, "KICK_CLIENT_DIALOG", lobby, new WidgetArgs
{
{ "clientName", c.Name },
{ "okPressed", okPressed }
{ "okPressed", okPressed },
{ "cancelPressed", after }
});
};
}
public static void SetupEditableColorWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, ColorPreviewManagerWidget colorPreview)

View File

@@ -148,10 +148,10 @@ Container@CONFIRM_PROMPT:
Background@KICK_CLIENT_DIALOG:
X:15
Y:30
Width:503
Width:501
Height:219
Logic:KickClientLogic
Background:panel-black
Background:scrollpanel-bg
Children:
Label@TITLE:
X:0
@@ -196,3 +196,49 @@ Background@KICK_CLIENT_DIALOG:
Height:25
Text:Cancel
Font:Bold
Background@LOBBY_OPTIONS_BIN:
X:15
Y:30
Width:501
Height:219
Background:scrollpanel-bg
Children:
Label@TITLE:
X:0
Y:50
Width:PARENT_RIGHT
Height:25
Font:Bold
Align:Center
Text: Map Options
Checkbox@ALLOWCHEATS_CHECKBOX:
X:150
Y:80
Width:80
Height:20
Text:Enable Cheats / Debug Menu
Checkbox@CRATES_CHECKBOX:
X:150
Y:110
Width:80
Height:20
Text:Enable Crates
Checkbox@FRAGILEALLIANCES_CHECKBOX:
X:150
Y:140
Width:80
Height:20
Text:Allow Team Changes
Label@DIFFICULTY_DESC:
X:150
Y:170
Width:120
Height:25
Text:Mission Difficulty:
DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
X:265
Y:170
Width:100
Height:25
Font:Bold

View File

@@ -1,9 +1,9 @@
ScrollPanel@LOBBY_PLAYER_BIN:
X:15
Y:30
Width:503
ItemSpacing:5
Width:501
Height:219
ItemSpacing:5
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
X:5
@@ -94,7 +94,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
ImageName:checked
Checkbox@STATUS_CHECKBOX:
Visible:false
X:448
X:446
Y:2
Width:20
Height:20
@@ -129,11 +129,10 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Width:11
Height:25
Label@NAME:
Text:Name
Width:185
Height:25
X:15
X:20
Y:0-1
Width:180
Height:25
Button@KICK:
Width:25
Height:25
@@ -174,7 +173,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Y:0
Image@STATUS_IMAGE:
Visible:false
X:450
X:448
Y:4
Width:20
Height:20
@@ -195,16 +194,15 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Font:Regular
Visible:false
Label@NAME:
Text:Name
Width:200
Height:25
X:15
X:20
Y:0-1
Width:195
Height:25
Visible:false
Button@JOIN:
Text:Play in this slot
Font:Regular
Width:315-55
Width:257
Height:25
X:210
Y:0
@@ -283,11 +281,10 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Width:11
Height:25
Label@NAME:
Text:Name
Width:185
Height:25
X:15
X:20
Y:0-1
Width:180
Height:25
Button@KICK:
Text:X
Width:25
@@ -306,14 +303,14 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Container@TEMPLATE_NEW_SPECTATOR:
X:5
Y:0
Width:475
Width:474
Height:25
Visible:false
Children:
Button@SPECTATE:
Text:Spectate
Font:Regular
Width:455
Width:453
Height:25
X:15
Y:0

View File

@@ -83,36 +83,35 @@ Container@SERVER_LOBBY:
Align:Center
Font:Bold
Label@STATUS:
X:448
X:446
Width:20
Height:25
Text:Ready
Align:Left
Font:Bold
Checkbox@ALLOWCHEATS_CHECKBOX:
Button@OPTIONS_BUTTON:
X:15
Y:257
Width:130
Height:20
Text:Cheats
Checkbox@CRATES_CHECKBOX:
X:120
Y:257
Width:80
Height:20
Text:Crates
Y:254
Width:112
Height:25
DropDownButton@SLOTS_DROPDOWNBUTTON:
X:213
Y:255
X:132
Y:254
Width:150
Height:25
Text:Slot Options
Text:Slot Admin
Button@CHANGEMAP_BUTTON:
X:368
Y:255
Width:150
X:287
Y:254
Width:112
Height:25
Text:Change Map
Button@START_GAME_BUTTON:
X:404
Y:254
Width:112
Height:25
Text:Start Game
ScrollPanel@CHAT_DISPLAY:
X:15
Y:285
@@ -156,21 +155,15 @@ Container@SERVER_LOBBY:
Align:Right
Text:Chat:
Button@DISCONNECT_BUTTON:
X:0
X:600
Y:499
Width:140
Height:35
Text:Leave Game
Button@MUSIC_BUTTON:
X:150
X:450
Y:499
Width:140
Height:35
Text:Music
Button@START_GAME_BUTTON:
X:600
Y:499
Width:140
Height:35
Text:Start Game
TooltipContainer@TOOLTIP_CONTAINER:

View File

@@ -2,7 +2,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
X:20
Y:67
ItemSpacing:5
Width:504
Width:535
Height:235
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
@@ -37,21 +37,20 @@ ScrollPanel@LOBBY_PLAYER_BIN:
TextField@NAME:
Text:Name
X:15
Width:135
Width:165
Height:25
MaxLength:16
DropDownButton@SLOT_OPTIONS:
Text:Name
X:15
Width:135
Width:165
Height:25
Font:Regular
Visible:false
DropDownButton@COLOR:
X:190
Width:80
Height:25
X:160
Y:0
Children:
ColorBlock@COLORBLOCK:
X:5
@@ -59,37 +58,35 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Width:PARENT_RIGHT-35
Height:PARENT_BOTTOM-12
DropDownButton@FACTION:
X:280
Width:130
Height:25
X:250
Y:0
Children:
Image@FACTIONFLAG:
Width:23
Height:23
X:5
X:4
Y:2
Label@FACTIONNAME:
Text:Faction
Width:70
Height:25
X:30
X:34
Y:0
DropDownButton@TEAM:
Text:Team
X:420
Width:48
Height:25
X:390
Y:0
Text:Team
Checkbox@STATUS_CHECKBOX:
X:448
X:477
Y:2
Width:20
Height:20
Visible:false
Image@STATUS_IMAGE:
Visible:false
X:450
X:479
Y:4
Width:20
Height:20
@@ -127,7 +124,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Height:25
Label@NAME:
Text:Name
Width:130
Width:165
Height:25
X:20
Y:0-1
@@ -135,41 +132,41 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:X
Width:25
Height:23
X:125
X:155
Y:2
Font:Bold
ColorBlock@COLORBLOCK:
X:165
X:195
Y:6
Width:45
Height:13
Container@FACTION:
Width:130
Width:160
Height:25
X:250
X:280
Y:0
Children:
Image@FACTIONFLAG:
Width:23
Height:23
X:5
X:4
Y:2
Label@FACTIONNAME:
Text:Faction
Width:60
Height:25
X:40
X:34
Y:0
Label@TEAM:
Text:Team
Width:23
Height:25
Align:Center
X:390
X:420
Y:0
Image@STATUS_IMAGE:
Visible:false
X:450
X:479
Y:4
Width:20
Height:20
@@ -184,13 +181,13 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Children:
Label@NAME:
Text:Name
Width:130
Width:165
Height:25
X:20
Y:0-1
DropDownButton@SLOT_OPTIONS:
Text:Name
Width:135
Width:165
Height:25
X:15
Y:0
@@ -199,7 +196,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:Play in this slot
Width:278
Height:25
X:160
X:190
Y:0
Container@TEMPLATE_EDITABLE_SPECTATOR:
X:5
@@ -233,14 +230,14 @@ ScrollPanel@LOBBY_PLAYER_BIN:
TextField@NAME:
Text:Name
X:15
Width:135
Width:165
Height:25
MaxLength:16
Label@SPECTATOR:
Text:Spectator
Width:278
Height:25
X:160
X:190
Y:0
Align:Center
Font:Bold
@@ -275,7 +272,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Height:25
Label@NAME:
Text:Name
Width:130
Width:160
Height:25
X:20
Y:0-1
@@ -283,14 +280,14 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:X
Width:25
Height:23
X:125
X:155
Y:2
Font:Bold
Label@SPECTATOR:
Text:Spectator
Width:278
Height:25
X:160
X:190
Y:0
Align:Center
Font:Bold
@@ -306,5 +303,25 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Font:Regular
Width:278
Height:25
X:160
X:190
Y:0
ScrollPanel@RACE_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Image@FLAG:
X:2
Y:2
Width:30
Height:15
Label@LABEL:
X:30
Width:70
Height:25

View File

@@ -25,26 +25,6 @@ ScrollPanel@LABEL_DROPDOWN_TEMPLATE:
Width:PARENT_RIGHT-20
Height:25
ScrollPanel@RACE_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Image@FLAG:
X:5
Y:5
Width:30
Height:15
Label@LABEL:
X:40
Width:60
Height:25
ScrollPanel@TEAM_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:

View File

@@ -1,7 +1,7 @@
Background@KICK_CLIENT_DIALOG:
X:20
Y:67
Width:504
Width:535
Height:235
Logic:KickClientLogic
Background:dialog3
@@ -49,3 +49,49 @@ Background@KICK_CLIENT_DIALOG:
Height:25
Text:Cancel
Font:Bold
Background@LOBBY_OPTIONS_BIN:
X:20
Y:67
Width:535
Height:235
Background:dialog3
Children:
Label@TITLE:
X:0
Y:50
Width:PARENT_RIGHT
Height:25
Font:Bold
Align:Center
Text: Map Options
Checkbox@ALLOWCHEATS_CHECKBOX:
X:150
Y:80
Width:80
Height:20
Text:Enable Cheats / Debug Menu
Checkbox@CRATES_CHECKBOX:
X:150
Y:110
Width:80
Height:20
Text:Enable Crates
Checkbox@FRAGILEALLIANCES_CHECKBOX:
X:150
Y:140
Width:80
Height:20
Text:Allow Team Changes
Label@DIFFICULTY_DESC:
X:150
Y:170
Width:120
Height:25
Text:Mission Difficulty:
DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
X:265
Y:170
Width:100
Height:25
Font:Bold

View File

@@ -2,7 +2,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
X:20
Y:67
ItemSpacing:5
Width:504
Width:535
Height:235
Children:
Container@TEMPLATE_EDITABLE_PLAYER:
@@ -37,21 +37,20 @@ ScrollPanel@LOBBY_PLAYER_BIN:
TextField@NAME:
Text:Name
X:15
Width:135
Width:165
Height:25
MaxLength:16
DropDownButton@SLOT_OPTIONS:
Text:Name
X:15
Width:135
Width:165
Height:25
Font:Regular
Visible:false
DropDownButton@COLOR:
X:190
Width:80
Height:25
X:160
Y:0
Children:
ColorBlock@COLORBLOCK:
X:5
@@ -59,10 +58,9 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Width:PARENT_RIGHT-35
Height:PARENT_BOTTOM-12
DropDownButton@FACTION:
X:280
Width:130
Height:25
X:250
Y:0
Children:
Image@FACTIONFLAG:
Width:30
@@ -76,20 +74,19 @@ ScrollPanel@LOBBY_PLAYER_BIN:
X:40
Y:0
DropDownButton@TEAM:
Text:Team
X:420
Width:48
Height:25
X:390
Y:0
Text:Team
Checkbox@STATUS_CHECKBOX:
X:448
X:477
Y:2
Width:20
Height:20
Visible:false
Image@STATUS_IMAGE:
Visible:false
X:450
X:479
Y:4
Width:20
Height:20
@@ -127,7 +124,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Height:25
Label@NAME:
Text:Name
Width:130
Width:165
Height:25
X:20
Y:0-1
@@ -135,18 +132,18 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:X
Width:25
Height:23
X:125
X:155
Y:2
Font:Bold
ColorBlock@COLORBLOCK:
X:165
X:195
Y:6
Width:45
Height:13
Container@FACTION:
Width:130
Width:160
Height:25
X:250
X:280
Y:0
Children:
Image@FACTIONFLAG:
@@ -165,11 +162,11 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Width:23
Height:25
Align:Center
X:390
X:420
Y:0
Image@STATUS_IMAGE:
Visible:false
X:450
X:479
Y:4
Width:20
Height:20
@@ -184,13 +181,13 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Children:
Label@NAME:
Text:Name
Width:130
Width:165
Height:25
X:20
Y:0-1
DropDownButton@SLOT_OPTIONS:
Text:Name
Width:135
Width:165
Height:25
X:15
Y:0
@@ -199,7 +196,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:Play in this slot
Width:278
Height:25
X:160
X:190
Y:0
Container@TEMPLATE_EDITABLE_SPECTATOR:
X:5
@@ -233,14 +230,14 @@ ScrollPanel@LOBBY_PLAYER_BIN:
TextField@NAME:
Text:Name
X:15
Width:135
Width:165
Height:25
MaxLength:16
Label@SPECTATOR:
Text:Spectator
Width:278
Height:25
X:160
X:190
Y:0
Align:Center
Font:Bold
@@ -275,7 +272,7 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Height:25
Label@NAME:
Text:Name
Width:130
Width:160
Height:25
X:20
Y:0-1
@@ -283,14 +280,14 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Text:X
Width:25
Height:23
X:125
X:155
Y:2
Font:Bold
Label@SPECTATOR:
Text:Spectator
Width:278
Height:25
X:160
X:190
Y:0
Align:Center
Font:Bold
@@ -306,5 +303,25 @@ ScrollPanel@LOBBY_PLAYER_BIN:
Font:Regular
Width:278
Height:25
X:160
X:190
Y:0
ScrollPanel@RACE_DROPDOWN_TEMPLATE:
Width:DROPDOWN_WIDTH
Children:
ScrollItem@TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Image@FLAG:
X:5
Y:5
Width:30
Height:15
Label@LABEL:
X:40
Width:60
Height:25

View File

@@ -10,78 +10,115 @@ Background@SERVER_LOBBY:
X:0
Y:17
Align:Center
Width:530
Width:PARENT_RIGHT
Height:20
Font:Bold
Label@MAP_TITLE:
X:532
Y:17
Align:Center
Width:250
Height:20
Font:Bold
Background@LOBBY_MAP_BG:
X:PARENT_RIGHT-268
Y:50
Width:252
Height:252
Background@MAP_BG:
X:PARENT_RIGHT-20-WIDTH
Y:67
Width:214
Height:214
Background:dialog3
Children:
MapPreview@MAP_PREVIEW:
X:4
Y:4
Width:244
Height:244
X:2
Y:2
Width:210
Height:210
TooltipContainer:TOOLTIP_CONTAINER
Label@MAP_TITLE:
X:PARENT_RIGHT-20-WIDTH
Y:282
Width:214
Height:25
Font:Bold
Align:Center
Label@MAP_TYPE:
X:PARENT_RIGHT-20-WIDTH
Y:297
Width:214
Height:25
Font:TinyBold
Align:Center
Label@MAP_AUTHOR:
X:PARENT_RIGHT-20-WIDTH
Y:310
Width:214
Height:25
Font:Tiny
Align:Center
Container@LABEL_CONTAINER:
X:25
Y:40
Children:
Label@LABEL_LOBBY_NAME:
Width:150
Height:25
X:0
Y:0
Width:180
Height:25
Text:Name
Align:Center
Font:Bold
Label@LABEL_LOBBY_COLOR:
X:190
Width:80
Height:25
X:160
Y:0
Text:Color
Align:Center
Font:Bold
Label@LABEL_LOBBY_FACTION:
X:280
Width:130
Height:25
X:250
Y:0
Text:Faction
Align:Center
Font:Bold
Label@LABEL_LOBBY_TEAM:
X:420
Width:48
Height:25
X:390
Y:0
Text:Team
Align:Center
Font:Bold
Label@LABEL_LOBBY_STATUS:
X:448
Y:0
X:477
Width:20
Height:25
Text:Ready
Align:Left
Font:Bold
DropDownButton@SLOTS_DROPDOWNBUTTON:
X:20
Y:PARENT_BOTTOM - 291
Width:151
Height:25
Font:Bold
Text:Slot Admin
Button@OPTIONS_BUTTON:
X:178
Y:PARENT_BOTTOM - 291
Width:121
Height:25
Font:Bold
Text:Game Options
Button@CHANGEMAP_BUTTON:
X:306
Y:PARENT_BOTTOM - 291
Width:121
Height:25
Text:Change Map
Font:Bold
Button@START_GAME_BUTTON:
X:434
Y:PARENT_BOTTOM - 291
Width:121
Height:25
Text:Start Game
Font:Bold
ScrollPanel@CHAT_DISPLAY:
X:20
Y:PARENT_BOTTOM - 289
Width:PARENT_RIGHT - 200
Height:230
Y:PARENT_BOTTOM - HEIGHT - 52
Width:760
Height:210
ItemSpacing:1
Children:
Container@CHAT_TEMPLATE:
@@ -106,69 +143,24 @@ Background@SERVER_LOBBY:
Height:15
WordWrap:true
VAlign:Top
Label@LABEL_CHATTYPE:
Width:65
Height:25
X:0
Y:PARENT_BOTTOM - 50
Text:Chat:
Align:Right
TextField@CHAT_TEXTFIELD:
X:70
Y:PARENT_BOTTOM - 49
Width:550
X:20
Y:PARENT_BOTTOM - HEIGHT - 20
Width:PARENT_RIGHT - 167
Height:25
Button@CHANGEMAP_BUTTON:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-289
Width:120
LeftMargin:50
Children:
Label@LABEL_CHATTYPE:
Y:0-1
Width:45
Height:25
Text:Change Map
Font:Bold
DropDownButton@SLOTS_DROPDOWNBUTTON:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-229
Width:120
Height:25
Font:Bold
Text:Admin
DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-199
Width:120
Height:25
Font:Bold
Visible:false
Checkbox@ALLOWCHEATS_CHECKBOX:
X: PARENT_RIGHT-154
Y: PARENT_BOTTOM-169
Width: 80
Height: 20
Text: Allow Cheats
Checkbox@CRATES_CHECKBOX:
X: PARENT_RIGHT-154
Y: PARENT_BOTTOM-144
Width: 80
Height: 20
Text: Crates
Checkbox@FRAGILEALLIANCES_CHECKBOX:
X: PARENT_RIGHT-154
Y: PARENT_BOTTOM-119
Width: 80
Height: 20
Text: Fragile Alliances
Align:Right
Text:Chat:
Button@DISCONNECT_BUTTON:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-94
X:PARENT_RIGHT - WIDTH - 20
Y:PARENT_BOTTOM - HEIGHT - 20
Width:120
Height:25
Text:Disconnect
Font:Bold
Button@START_GAME_BUTTON:
X:PARENT_RIGHT-154
Y:PARENT_BOTTOM-49
Width:120
Height:25
Text:Start Game
Font:Bold
TooltipContainer@TOOLTIP_CONTAINER: