diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
index 5388ce84304d..b9e92cd105c0 100644
--- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
+++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
@@ -834,6 +834,7 @@
+
diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs
index 8de81daac6e2..e45fbfe3b512 100644
--- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs
+++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs
@@ -285,7 +285,13 @@ void ConnectionStateChanged(OrderManager om)
};
}
- var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs());
+ var optionsBin = Ui.LoadWidget("LOBBY_OPTIONS_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs()
+ {
+ { "orderManager", orderManager },
+ { "getMap", (Func)(() => map) },
+ { "configurationDisabled", configurationDisabled }
+ });
+
optionsBin.IsVisible = () => panel == PanelType.Options;
var musicBin = Ui.LoadWidget("LOBBY_MUSIC_BIN", lobby.Get("TOP_PANELS_ROOT"), new WidgetArgs
@@ -297,8 +303,9 @@ void ConnectionStateChanged(OrderManager om)
var optionsTab = lobby.Get("OPTIONS_TAB");
optionsTab.IsHighlighted = () => panel == PanelType.Options;
- optionsTab.IsDisabled = () => !map.RulesLoaded || map.InvalidCustomRules || panel == PanelType.Kick || panel == PanelType.ForceStart;
+ optionsTab.IsDisabled = OptionsTabDisabled;
optionsTab.OnClick = () => panel = PanelType.Options;
+ optionsTab.GetText = () => !map.RulesLoaded ? "Loading..." : optionsTab.Text;
var playersTab = lobby.Get("PLAYERS_TAB");
playersTab.IsHighlighted = () => panel == PanelType.Players;
@@ -340,101 +347,6 @@ void ConnectionStateChanged(OrderManager om)
forceStartBin.Get("OK_BUTTON").OnClick = startGame;
forceStartBin.Get("CANCEL_BUTTON").OnClick = () => panel = PanelType.Players;
- // Options panel
- var optionCheckboxes = new Dictionary()
- {
- { "EXPLORED_MAP_CHECKBOX", "explored" },
- { "CRATES_CHECKBOX", "crates" },
- { "SHORTGAME_CHECKBOX", "shortgame" },
- { "FOG_CHECKBOX", "fog" },
- { "ALLYBUILDRADIUS_CHECKBOX", "allybuild" },
- { "ALLOWCHEATS_CHECKBOX", "cheats" },
- { "CREEPS_CHECKBOX", "creeps" },
- { "BUILDRADIUS_CHECKBOX", "buildradius" },
- };
-
- foreach (var kv in optionCheckboxes)
- {
- var checkbox = optionsBin.GetOrNull(kv.Key);
- if (checkbox != null)
- {
- var option = new CachedTransform(
- gs => gs.LobbyOptions[kv.Value]);
-
- var visible = new CachedTransform(
- gs => gs.LobbyOptions.ContainsKey(kv.Value));
-
- checkbox.IsVisible = () => visible.Update(orderManager.LobbyInfo.GlobalSettings);
- checkbox.IsChecked = () => option.Update(orderManager.LobbyInfo.GlobalSettings).Enabled;
- checkbox.IsDisabled = () => configurationDisabled() ||
- option.Update(orderManager.LobbyInfo.GlobalSettings).Locked;
- checkbox.OnClick = () => orderManager.IssueOrder(Order.Command(
- "option {0} {1}".F(kv.Value, !option.Update(orderManager.LobbyInfo.GlobalSettings).Enabled)));
- }
- }
-
- var optionDropdowns = new Dictionary()
- {
- { "TECHLEVEL", "techlevel" },
- { "STARTINGUNITS", "startingunits" },
- { "STARTINGCASH", "startingcash" },
- { "DIFFICULTY", "difficulty" },
- { "GAMESPEED", "gamespeed" }
- };
-
- var allOptions = new CachedTransform(
- mapPreview => mapPreview.Rules.Actors["player"].TraitInfos()
- .Concat(mapPreview.Rules.Actors["world"].TraitInfos())
- .SelectMany(t => t.LobbyOptions(mapPreview.Rules))
- .ToArray());
-
- foreach (var kv in optionDropdowns)
- {
- var dropdown = optionsBin.GetOrNull(kv.Key + "_DROPDOWNBUTTON");
- if (dropdown != null)
- {
- var optionValue = new CachedTransform(
- gs => gs.LobbyOptions[kv.Value]);
-
- var option = new CachedTransform(
- mapPreview => allOptions.Update(mapPreview).FirstOrDefault(o => o.Id == kv.Value));
-
- var getOptionLabel = new CachedTransform(id =>
- {
- string value;
- if (id == null || !option.Update(map).Values.TryGetValue(id, out value))
- return "Not Available";
-
- return value;
- });
-
- dropdown.GetText = () => getOptionLabel.Update(optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Value);
- dropdown.IsVisible = () => option.Update(map) != null;
- dropdown.IsDisabled = () => configurationDisabled() ||
- optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Locked;
-
- dropdown.OnMouseDown = _ =>
- {
- Func, ScrollItemWidget, ScrollItemWidget> setupItem = (c, template) =>
- {
- Func isSelected = () => optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Value == c.Key;
- Action onClick = () => orderManager.IssueOrder(Order.Command("option {0} {1}".F(kv.Value, c.Key)));
-
- var item = ScrollItemWidget.Setup(template, isSelected, onClick);
- item.Get("LABEL").GetText = () => c.Value;
- return item;
- };
-
- var options = option.Update(map).Values;
- dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", options.Count() * 30, options, setupItem);
- };
-
- var label = optionsBin.GetOrNull(kv.Key + "_DESC");
- if (label != null)
- label.IsVisible = () => option.Update(map) != null;
- }
- }
-
var disconnectButton = lobby.Get("DISCONNECT_BUTTON");
disconnectButton.OnClick = () => { Ui.CloseWindow(); onExit(); };
@@ -552,8 +464,16 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}
+ bool OptionsTabDisabled()
+ {
+ return !map.RulesLoaded || map.InvalidCustomRules || panel == PanelType.Kick || panel == PanelType.ForceStart;
+ }
+
public override void Tick()
{
+ if (panel == PanelType.Options && OptionsTabDisabled())
+ panel = PanelType.Players;
+
var newMessages = Game.GlobalChat.History.Count(m => m.Type == ChatMessageType.Message);
globalChatUnreadMessages += newMessages - globalChatLastReadMessages;
globalChatLastReadMessages = newMessages;
diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyOptionsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyOptionsLogic.cs
new file mode 100644
index 000000000000..b0fdb1963929
--- /dev/null
+++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyOptionsLogic.cs
@@ -0,0 +1,179 @@
+#region Copyright & License Information
+/*
+ * Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
+ * This file is part of OpenRA, which is free software. It is made
+ * available to you under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version. For more
+ * information, see COPYING.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using OpenRA.Network;
+using OpenRA.Traits;
+using OpenRA.Widgets;
+
+namespace OpenRA.Mods.Common.Widgets.Logic
+{
+ public class LobbyOptionsLogic : ChromeLogic
+ {
+ readonly ScrollPanelWidget panel;
+ readonly Widget optionsContainer;
+ readonly Widget checkboxTemplate;
+ readonly Widget dropdownTemplate;
+
+ readonly Func getMap;
+ readonly OrderManager orderManager;
+ readonly Func configurationDisabled;
+ MapPreview mapPreview;
+ bool validOptions;
+
+ [ObjectCreator.UseCtor]
+ internal LobbyOptionsLogic(Widget widget, OrderManager orderManager, Func getMap, Func configurationDisabled)
+ {
+ this.getMap = getMap;
+ this.orderManager = orderManager;
+ this.configurationDisabled = configurationDisabled;
+
+ panel = (ScrollPanelWidget)widget;
+ optionsContainer = widget.Get("LOBBY_OPTIONS");
+ optionsContainer.IsVisible = () => validOptions;
+ checkboxTemplate = optionsContainer.Get("CHECKBOX_ROW_TEMPLATE");
+ dropdownTemplate = optionsContainer.Get("DROPDOWN_ROW_TEMPLATE");
+
+ mapPreview = getMap();
+ RebuildOptions();
+ }
+
+ public override void Tick()
+ {
+ var newMapPreview = getMap();
+ if (newMapPreview == mapPreview)
+ return;
+
+ if (newMapPreview.RulesLoaded)
+ {
+ // We are currently enumerating the widget tree and so can't modify any layout
+ // Defer it to the end of tick instead
+ Game.RunAfterTick(() =>
+ {
+ mapPreview = newMapPreview;
+ RebuildOptions();
+ validOptions = true;
+ });
+ }
+ else
+ validOptions = false;
+ }
+
+ void RebuildOptions()
+ {
+ if (mapPreview == null || mapPreview.Rules == null || mapPreview.InvalidCustomRules)
+ return;
+
+ optionsContainer.RemoveChildren();
+ optionsContainer.Bounds.Height = 0;
+ var allOptions = mapPreview.Rules.Actors["player"].TraitInfos()
+ .Concat(mapPreview.Rules.Actors["world"].TraitInfos())
+ .SelectMany(t => t.LobbyOptions(mapPreview.Rules))
+ .Where(o => o.Visible)
+ .OrderBy(o => o.DisplayOrder)
+ .ToArray();
+
+ Widget row = null;
+ Queue checkboxColumns = new Queue();
+ Queue dropdownColumns = new Queue();
+
+ foreach (var option in allOptions.Where(o => o is LobbyBooleanOption))
+ {
+ if (!checkboxColumns.Any())
+ {
+ row = checkboxTemplate.Clone() as Widget;
+ row.Bounds.Y = optionsContainer.Bounds.Height;
+ optionsContainer.Bounds.Height += row.Bounds.Height;
+ foreach (var child in row.Children)
+ if (child is CheckboxWidget)
+ checkboxColumns.Enqueue((CheckboxWidget)child);
+
+ optionsContainer.AddChild(row);
+ }
+
+ var checkbox = checkboxColumns.Dequeue();
+ var optionValue = new CachedTransform(
+ gs => gs.LobbyOptions[option.Id]);
+
+ checkbox.GetText = () => option.Name;
+ if (option.Description != null)
+ checkbox.GetTooltipText = () => option.Description;
+ checkbox.IsVisible = () => true;
+ checkbox.IsChecked = () => optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Enabled;
+ checkbox.IsDisabled = () => configurationDisabled() ||
+ optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Locked;
+ checkbox.OnClick = () => orderManager.IssueOrder(Order.Command(
+ "option {0} {1}".F(option.Id, !optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Enabled)));
+ }
+
+ foreach (var option in allOptions.Where(o => !(o is LobbyBooleanOption)))
+ {
+ if (!dropdownColumns.Any())
+ {
+ row = dropdownTemplate.Clone() as Widget;
+ row.Bounds.Y = optionsContainer.Bounds.Height;
+ optionsContainer.Bounds.Height += row.Bounds.Height;
+ foreach (var child in row.Children)
+ if (child is DropDownButtonWidget)
+ dropdownColumns.Enqueue((DropDownButtonWidget)child);
+
+ optionsContainer.AddChild(row);
+ }
+
+ var dropdown = dropdownColumns.Dequeue();
+ var optionValue = new CachedTransform(
+ gs => gs.LobbyOptions[option.Id]);
+
+ var getOptionLabel = new CachedTransform(id =>
+ {
+ string value;
+ if (id == null || !option.Values.TryGetValue(id, out value))
+ return "Not Available";
+
+ return value;
+ });
+
+ dropdown.GetText = () => getOptionLabel.Update(optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Value);
+ if (option.Description != null)
+ dropdown.GetTooltipText = () => option.Description;
+ dropdown.IsVisible = () => true;
+ dropdown.IsDisabled = () => configurationDisabled() ||
+ optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Locked;
+
+ dropdown.OnMouseDown = _ =>
+ {
+ Func, ScrollItemWidget, ScrollItemWidget> setupItem = (c, template) =>
+ {
+ Func isSelected = () => optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Value == c.Key;
+ Action onClick = () => orderManager.IssueOrder(Order.Command("option {0} {1}".F(option.Id, c.Key)));
+
+ var item = ScrollItemWidget.Setup(template, isSelected, onClick);
+ item.Get("LABEL").GetText = () => c.Value;
+ return item;
+ };
+
+ dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", option.Values.Count() * 30, option.Values, setupItem);
+ };
+
+ var label = row.GetOrNull(dropdown.Id + "_DESC");
+ if (label != null)
+ {
+ label.GetText = () => option.Name;
+ label.IsVisible = () => true;
+ }
+ }
+
+ panel.ContentHeight = optionsContainer.Bounds.Y + optionsContainer.Bounds.Height;
+ }
+ }
+}
diff --git a/mods/cnc/chrome/lobby-options.yaml b/mods/cnc/chrome/lobby-options.yaml
index d4feee23543f..e57c07826803 100644
--- a/mods/cnc/chrome/lobby-options.yaml
+++ b/mods/cnc/chrome/lobby-options.yaml
@@ -1,7 +1,6 @@
-Background@LOBBY_OPTIONS_BIN:
+Container@LOBBY_OPTIONS_BIN:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
- Background: scrollpanel-bg
Children:
Label@TITLE:
Y: 0 - 25
@@ -10,117 +9,66 @@ Background@LOBBY_OPTIONS_BIN:
Font: Bold
Align: Center
Text: Map Options
- Container:
- X: 30
- Y: 30
- Width: PARENT_RIGHT - 60
- Height: PARENT_BOTTOM - 75
+ ScrollPanel:
+ Logic: LobbyOptionsLogic
+ Width: PARENT_RIGHT
+ Height: PARENT_BOTTOM
Children:
- Checkbox@EXPLORED_MAP_CHECKBOX:
- Width: 150
- Height: 20
- Font: Regular
- Text: Explored Map
- Checkbox@FOG_CHECKBOX:
- Y: 35
- Width: 150
- Height: 20
- Font: Regular
- Text: Fog of War
- Checkbox@CRATES_CHECKBOX:
- X: 170
- Width: 225
- Height: 20
- Font: Regular
- Text: Crates
- Checkbox@ALLYBUILDRADIUS_CHECKBOX:
- X: 170
- Y: 35
- Width: 225
- Height: 20
- Font: Regular
- Text: Build off Allies' ConYards
- Checkbox@SHORTGAME_CHECKBOX:
- X: 400
- Width: 150
- Height: 20
- Font: Regular
- Text: Short Game
- Checkbox@ALLOWCHEATS_CHECKBOX:
- X: 400
- Y: 35
- Width: 150
- Height: 20
- Font: Regular
- Text: Debug Menu
- Checkbox@BUILDRADIUS_CHECKBOX:
- Y: 70
- Width: 150
- Height: 20
- Font: Regular
- Text: Limit ConYard Area
- Label@DIFFICULTY_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 70
- Width: 160
- Height: 25
- Text: Mission Difficulty:
- Align: Right
- DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 70
- Width: 160
- Height: 25
- Font: Regular
- Label@STARTINGCASH_DESC:
- Y: 110
- Width: 80
- Height: 25
- Text: Starting Cash:
- Align: Right
- DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
- X: 85
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- Text: $5000
- Label@STARTINGUNITS_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 110
- Width: 120
- Height: 25
- Text: Starting Units:
- Align: Right
- DropDownButton@STARTINGUNITS_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- DropDownButton@TECHLEVEL_DROPDOWNBUTTON:
- X: 85
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
- Text: 10
- Label@TECHLEVEL_DESC:
- Y: 150
- Width: 80
- Height: 25
- Text: Tech Level:
- Align: Right
- Label@GAMESPEED_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 150
- Width: 120
- Height: 25
- Text: Game Speed:
- Align: Right
- DropDownButton@GAMESPEED_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
+ Container@LOBBY_OPTIONS:
+ X: 18
+ Y: 30
+ Width: PARENT_RIGHT - 24 - 18
+ Height: PARENT_BOTTOM - 75
+ Children:
+ Container@CHECKBOX_ROW_TEMPLATE:
+ Height: 35
+ Children:
+ Checkbox@A:
+ Width: 175
+ Height: 20
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Checkbox@B:
+ X: 195
+ Width: 175
+ Height: 20
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Checkbox@C:
+ X: 375
+ Width: 175
+ Height: 20
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Container@DROPDOWN_ROW_TEMPLATE:
+ Height: 35
+ Width: PARENT_RIGHT
+ Children:
+ Label@A_DESC:
+ Width: 80
+ Height: 25
+ Align: Right
+ Visible: False
+ DropDownButton@A:
+ X: 85
+ Width: 160
+ Height: 25
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Label@B_DESC:
+ X: PARENT_RIGHT - WIDTH - 183
+ Width: 160
+ Height: 25
+ Align: Right
+ Visible: False
+ DropDownButton@B:
+ X: PARENT_RIGHT - WIDTH - 18
+ Width: 160
+ Height: 25
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
\ No newline at end of file
diff --git a/mods/common/chrome/lobby-options.yaml b/mods/common/chrome/lobby-options.yaml
index 496a4ab7c4a0..7c1e68747f43 100644
--- a/mods/common/chrome/lobby-options.yaml
+++ b/mods/common/chrome/lobby-options.yaml
@@ -1,115 +1,70 @@
-Background@LOBBY_OPTIONS_BIN:
+Container@LOBBY_OPTIONS_BIN:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
- Background: dialog3
Children:
Label@TITLE:
- X: 0
Y: 0 - 27
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Map Options
- Container:
- X: 30
- Y: 30
- Width: PARENT_RIGHT - 60
- Height: PARENT_BOTTOM - 75
+ ScrollPanel:
+ Logic: LobbyOptionsLogic
+ Width: PARENT_RIGHT
+ Height: PARENT_BOTTOM
Children:
- Checkbox@EXPLORED_MAP_CHECKBOX:
- Width: 150
- Height: 20
- Text: Explored Map
- Checkbox@FOG_CHECKBOX:
- Y: 35
- Width: 150
- Height: 20
- Text: Fog of War
- Checkbox@CRATES_CHECKBOX:
- X: 170
- Width: 225
- Height: 20
- Text: Crates
- Checkbox@ALLYBUILDRADIUS_CHECKBOX:
- X: 170
- Y: 35
- Width: 225
- Height: 20
- Text: Build off Allies' ConYards
- Checkbox@SHORTGAME_CHECKBOX:
- X: 400
- Width: 150
- Height: 20
- Text: Short Game
- Checkbox@ALLOWCHEATS_CHECKBOX:
- X: 400
- Y: 35
- Width: 150
- Height: 20
- Text: Debug Menu
- Label@DIFFICULTY_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 70
- Width: 160
- Height: 25
- Text: Mission Difficulty:
- Align: Right
- DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 70
- Width: 160
- Height: 25
- Font: Regular
- Label@STARTINGCASH_DESC:
- Y: 110
- Width: 80
- Height: 25
- Text: Starting Cash:
- Align: Right
- DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
- X: 85
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- Text: $5000
- Label@STARTINGUNITS_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 110
- Width: 120
- Height: 25
- Text: Starting Units:
- Align: Right
- DropDownButton@STARTINGUNITS_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- DropDownButton@TECHLEVEL_DROPDOWNBUTTON:
- X: 85
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
- Text: 10
- Label@TECHLEVEL_DESC:
- Y: 150
- Width: 80
- Height: 25
- Text: Tech Level:
- Align: Right
- Label@GAMESPEED_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 150
- Width: 120
- Height: 25
- Text: Game Speed:
- Align: Right
- DropDownButton@GAMESPEED_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
+ Container@LOBBY_OPTIONS:
+ X: 18
+ Y: 30
+ Width: PARENT_RIGHT - 18 - 24
+ Height: PARENT_BOTTOM - 75
+ Children:
+ Container@CHECKBOX_ROW_TEMPLATE:
+ Height: 35
+ Children:
+ Checkbox@A:
+ Width: 175
+ Height: 20
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Checkbox@B:
+ X: 195
+ Width: 175
+ Height: 20
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Checkbox@C:
+ X: 375
+ Width: 175
+ Height: 20
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Container@DROPDOWN_ROW_TEMPLATE:
+ Height: 35
+ Width: PARENT_RIGHT
+ Children:
+ Label@A_DESC:
+ Width: 80
+ Height: 25
+ Align: Right
+ Visible: False
+ DropDownButton@A:
+ X: 85
+ Width: 160
+ Height: 25
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
+ Label@B_DESC:
+ X: PARENT_RIGHT - WIDTH - 183
+ Width: 160
+ Height: 25
+ Align: Right
+ Visible: False
+ DropDownButton@B:
+ X: PARENT_RIGHT - WIDTH - 18
+ Width: 160
+ Height: 25
+ Font: Regular
+ Visible: False
+ TooltipContainer: TOOLTIP_CONTAINER
\ No newline at end of file
diff --git a/mods/d2k/chrome/lobby-options.yaml b/mods/d2k/chrome/lobby-options.yaml
deleted file mode 100644
index b2c37fda62ae..000000000000
--- a/mods/d2k/chrome/lobby-options.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-Background@LOBBY_OPTIONS_BIN:
- Width: PARENT_RIGHT
- Height: PARENT_BOTTOM
- Background: dialog3
- Children:
- Label@TITLE:
- X: 0
- Y: 0 - 27
- Width: PARENT_RIGHT
- Height: 25
- Font: Bold
- Align: Center
- Text: Map Options
- Container:
- X: 30
- Y: 30
- Width: PARENT_RIGHT - 60
- Height: PARENT_BOTTOM - 75
- Children:
- Checkbox@EXPLORED_MAP_CHECKBOX:
- Width: 150
- Height: 20
- Text: Explored Map
- Checkbox@FOG_CHECKBOX:
- Y: 35
- Width: 150
- Height: 20
- Text: Fog of War
- Checkbox@CRATES_CHECKBOX:
- X: 170
- Width: 225
- Height: 20
- Text: Crates
- Checkbox@ALLYBUILDRADIUS_CHECKBOX:
- X: 170
- Y: 35
- Width: 225
- Height: 20
- Text: Build off Allies' ConYards
- Checkbox@SHORTGAME_CHECKBOX:
- X: 400
- Width: 150
- Height: 20
- Text: Short Game
- Checkbox@ALLOWCHEATS_CHECKBOX:
- X: 400
- Y: 35
- Width: 150
- Height: 20
- Font: Regular
- Text: Debug Menu
- Checkbox@CREEPS_CHECKBOX:
- Y: 70
- Width: 150
- Height: 20
- Text: Worms
- Label@DIFFICULTY_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 70
- Width: 160
- Height: 25
- Text: Mission Difficulty:
- Align: Right
- DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 70
- Width: 160
- Height: 25
- Font: Regular
- Label@STARTINGCASH_DESC:
- Y: 110
- Width: 80
- Height: 25
- Text: Starting Cash:
- Align: Right
- DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
- X: 85
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- Text: $5000
- Label@STARTINGUNITS_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 110
- Width: 120
- Height: 25
- Text: Starting Units:
- Align: Right
- DropDownButton@STARTINGUNITS_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- DropDownButton@TECHLEVEL_DROPDOWNBUTTON:
- X: 85
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
- Text: 10
- Label@TECHLEVEL_DESC:
- Y: 150
- Width: 80
- Height: 25
- Text: Tech Level:
- Align: Right
- Label@GAMESPEED_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 150
- Width: 120
- Height: 25
- Text: Game Speed:
- Align: Right
- DropDownButton@GAMESPEED_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml
index ed83e24102bd..be9757fa8b32 100644
--- a/mods/d2k/mod.yaml
+++ b/mods/d2k/mod.yaml
@@ -85,7 +85,7 @@ ChromeLayout:
common|chrome/lobby.yaml
common|chrome/lobby-mappreview.yaml
d2k|chrome/lobby-players.yaml
- d2k|chrome/lobby-options.yaml
+ common|chrome/lobby-options.yaml
common|chrome/lobby-music.yaml
common|chrome/lobby-kickdialogs.yaml
common|chrome/lobby-globalchat.yaml
diff --git a/mods/ra/chrome/lobby-options.yaml b/mods/ra/chrome/lobby-options.yaml
deleted file mode 100644
index dbbf091ec8d8..000000000000
--- a/mods/ra/chrome/lobby-options.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
-Background@LOBBY_OPTIONS_BIN:
- Width: PARENT_RIGHT
- Height: PARENT_BOTTOM
- Background: dialog3
- Children:
- Label@TITLE:
- X: 0
- Y: 0 - 27
- Width: PARENT_RIGHT
- Height: 25
- Font: Bold
- Align: Center
- Text: Map Options
- Container:
- X: 30
- Y: 30
- Width: PARENT_RIGHT - 60
- Height: PARENT_BOTTOM - 75
- Children:
- Checkbox@EXPLORED_MAP_CHECKBOX:
- Width: 150
- Height: 20
- Text: Explored Map
- Checkbox@FOG_CHECKBOX:
- Y: 35
- Width: 150
- Height: 20
- Text: Fog of War
- Checkbox@CRATES_CHECKBOX:
- X: 170
- Width: 225
- Height: 20
- Text: Crates
- Checkbox@ALLYBUILDRADIUS_CHECKBOX:
- X: 170
- Y: 35
- Width: 225
- Height: 20
- Text: Build off Allies' ConYards
- Checkbox@SHORTGAME_CHECKBOX:
- X: 400
- Width: 150
- Height: 20
- Text: Short Game
- Checkbox@ALLOWCHEATS_CHECKBOX:
- X: 400
- Y: 35
- Width: 150
- Height: 20
- Text: Debug Menu
- Checkbox@BUILDRADIUS_CHECKBOX:
- Y: 70
- Width: 225
- Height: 20
- Text: Limit ConYard Area
- Label@DIFFICULTY_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 70
- Width: 160
- Height: 25
- Text: Mission Difficulty:
- Align: Right
- DropDownButton@DIFFICULTY_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 70
- Width: 160
- Height: 25
- Font: Regular
- Label@STARTINGCASH_DESC:
- Y: 110
- Width: 80
- Height: 25
- Text: Starting Cash:
- Align: Right
- DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
- X: 85
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- Text: $5000
- Label@STARTINGUNITS_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 110
- Width: 120
- Height: 25
- Text: Starting Units:
- Align: Right
- DropDownButton@STARTINGUNITS_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 110
- Width: 160
- Height: 25
- Font: Regular
- DropDownButton@TECHLEVEL_DROPDOWNBUTTON:
- X: 85
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
- Text: 10
- Label@TECHLEVEL_DESC:
- Y: 150
- Width: 80
- Height: 25
- Text: Tech Level:
- Align: Right
- Label@GAMESPEED_DESC:
- X: PARENT_RIGHT - WIDTH - 165
- Y: 150
- Width: 120
- Height: 25
- Text: Game Speed:
- Align: Right
- DropDownButton@GAMESPEED_DROPDOWNBUTTON:
- X: PARENT_RIGHT - WIDTH
- Y: 150
- Width: 160
- Height: 25
- Font: Regular
diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml
index 73fbba4e3ab1..aaa167672e24 100644
--- a/mods/ra/mod.yaml
+++ b/mods/ra/mod.yaml
@@ -100,7 +100,7 @@ ChromeLayout:
common|chrome/lobby.yaml
common|chrome/lobby-mappreview.yaml
common|chrome/lobby-players.yaml
- ra|chrome/lobby-options.yaml
+ common|chrome/lobby-options.yaml
common|chrome/lobby-music.yaml
common|chrome/lobby-kickdialogs.yaml
common|chrome/lobby-globalchat.yaml