Move hardcoded list of lobby options into yaml.
This commit is contained in:
@@ -836,6 +836,7 @@
|
||||
<Compile Include="Widgets\Logic\Ingame\Hotkeys\PauseHotkeyLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Ingame\Hotkeys\CycleStatusBarsHotkeyLogic.cs" />
|
||||
<Compile Include="Lint\CheckConflictingMouseBounds.cs" />
|
||||
<Compile Include="Widgets\Logic\Lobby\LobbyOptionsLogic.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="AfterBuild">
|
||||
|
||||
@@ -285,7 +285,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
};
|
||||
}
|
||||
|
||||
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<MapPreview>)(() => 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 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
var optionsTab = lobby.Get<ButtonWidget>("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<ButtonWidget>("PLAYERS_TAB");
|
||||
playersTab.IsHighlighted = () => panel == PanelType.Players;
|
||||
@@ -340,101 +347,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
forceStartBin.Get<ButtonWidget>("OK_BUTTON").OnClick = startGame;
|
||||
forceStartBin.Get<ButtonWidget>("CANCEL_BUTTON").OnClick = () => panel = PanelType.Players;
|
||||
|
||||
// Options panel
|
||||
var optionCheckboxes = new Dictionary<string, string>()
|
||||
{
|
||||
{ "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<CheckboxWidget>(kv.Key);
|
||||
if (checkbox != null)
|
||||
{
|
||||
var option = new CachedTransform<Session.Global, Session.LobbyOptionState>(
|
||||
gs => gs.LobbyOptions[kv.Value]);
|
||||
|
||||
var visible = new CachedTransform<Session.Global, bool>(
|
||||
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<string, string>()
|
||||
{
|
||||
{ "TECHLEVEL", "techlevel" },
|
||||
{ "STARTINGUNITS", "startingunits" },
|
||||
{ "STARTINGCASH", "startingcash" },
|
||||
{ "DIFFICULTY", "difficulty" },
|
||||
{ "GAMESPEED", "gamespeed" }
|
||||
};
|
||||
|
||||
var allOptions = new CachedTransform<MapPreview, LobbyOption[]>(
|
||||
mapPreview => mapPreview.Rules.Actors["player"].TraitInfos<ILobbyOptions>()
|
||||
.Concat(mapPreview.Rules.Actors["world"].TraitInfos<ILobbyOptions>())
|
||||
.SelectMany(t => t.LobbyOptions(mapPreview.Rules))
|
||||
.ToArray());
|
||||
|
||||
foreach (var kv in optionDropdowns)
|
||||
{
|
||||
var dropdown = optionsBin.GetOrNull<DropDownButtonWidget>(kv.Key + "_DROPDOWNBUTTON");
|
||||
if (dropdown != null)
|
||||
{
|
||||
var optionValue = new CachedTransform<Session.Global, Session.LobbyOptionState>(
|
||||
gs => gs.LobbyOptions[kv.Value]);
|
||||
|
||||
var option = new CachedTransform<MapPreview, LobbyOption>(
|
||||
mapPreview => allOptions.Update(mapPreview).FirstOrDefault(o => o.Id == kv.Value));
|
||||
|
||||
var getOptionLabel = new CachedTransform<string, string>(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<KeyValuePair<string, string>, ScrollItemWidget, ScrollItemWidget> setupItem = (c, template) =>
|
||||
{
|
||||
Func<bool> 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<LabelWidget>("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<ButtonWidget>("DISCONNECT_BUTTON");
|
||||
disconnectButton.OnClick = () => { Ui.CloseWindow(); onExit(); };
|
||||
|
||||
@@ -552,8 +464,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
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;
|
||||
|
||||
179
OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyOptionsLogic.cs
Normal file
179
OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyOptionsLogic.cs
Normal file
@@ -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 checkboxRowTemplate;
|
||||
readonly Widget dropdownRowTemplate;
|
||||
|
||||
readonly Func<MapPreview> getMap;
|
||||
readonly OrderManager orderManager;
|
||||
readonly Func<bool> configurationDisabled;
|
||||
MapPreview mapPreview;
|
||||
bool validOptions;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
internal LobbyOptionsLogic(Widget widget, OrderManager orderManager, Func<MapPreview> getMap, Func<bool> configurationDisabled)
|
||||
{
|
||||
this.getMap = getMap;
|
||||
this.orderManager = orderManager;
|
||||
this.configurationDisabled = configurationDisabled;
|
||||
|
||||
panel = (ScrollPanelWidget)widget;
|
||||
optionsContainer = widget.Get("LOBBY_OPTIONS");
|
||||
optionsContainer.IsVisible = () => validOptions;
|
||||
checkboxRowTemplate = optionsContainer.Get("CHECKBOX_ROW_TEMPLATE");
|
||||
dropdownRowTemplate = 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<ILobbyOptions>()
|
||||
.Concat(mapPreview.Rules.Actors["world"].TraitInfos<ILobbyOptions>())
|
||||
.SelectMany(t => t.LobbyOptions(mapPreview.Rules))
|
||||
.Where(o => o.Visible)
|
||||
.OrderBy(o => o.DisplayOrder)
|
||||
.ToArray();
|
||||
|
||||
Widget row = null;
|
||||
var checkboxColumns = new Queue<CheckboxWidget>();
|
||||
var dropdownColumns = new Queue<DropDownButtonWidget>();
|
||||
|
||||
foreach (var option in allOptions.Where(o => o is LobbyBooleanOption))
|
||||
{
|
||||
if (!checkboxColumns.Any())
|
||||
{
|
||||
row = checkboxRowTemplate.Clone();
|
||||
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<Session.Global, Session.LobbyOptionState>(
|
||||
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 = dropdownRowTemplate.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<Session.Global, Session.LobbyOptionState>(
|
||||
gs => gs.LobbyOptions[option.Id]);
|
||||
|
||||
var getOptionLabel = new CachedTransform<string, string>(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<KeyValuePair<string, string>, ScrollItemWidget, ScrollItemWidget> setupItem = (c, template) =>
|
||||
{
|
||||
Func<bool> 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<LabelWidget>("LABEL").GetText = () => c.Value;
|
||||
return item;
|
||||
};
|
||||
|
||||
dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", option.Values.Count() * 30, option.Values, setupItem);
|
||||
};
|
||||
|
||||
var label = row.GetOrNull<LabelWidget>(dropdown.Id + "_DESC");
|
||||
if (label != null)
|
||||
{
|
||||
label.GetText = () => option.Name;
|
||||
label.IsVisible = () => true;
|
||||
}
|
||||
}
|
||||
|
||||
panel.ContentHeight = optionsContainer.Bounds.Y + optionsContainer.Bounds.Height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
ScrollPanel:
|
||||
Logic: LobbyOptionsLogic
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Children:
|
||||
Container@LOBBY_OPTIONS:
|
||||
X: 18
|
||||
Y: 30
|
||||
Width: PARENT_RIGHT - 60
|
||||
Width: PARENT_RIGHT - 24 - 18
|
||||
Height: PARENT_BOTTOM - 75
|
||||
Children:
|
||||
Checkbox@EXPLORED_MAP_CHECKBOX:
|
||||
Width: 150
|
||||
Container@CHECKBOX_ROW_TEMPLATE:
|
||||
Height: 35
|
||||
Children:
|
||||
Checkbox@A:
|
||||
Width: 175
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Explored Map
|
||||
Checkbox@FOG_CHECKBOX:
|
||||
Y: 35
|
||||
Width: 150
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Checkbox@B:
|
||||
X: 195
|
||||
Width: 175
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Fog of War
|
||||
Checkbox@CRATES_CHECKBOX:
|
||||
X: 170
|
||||
Width: 225
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Checkbox@C:
|
||||
X: 375
|
||||
Width: 175
|
||||
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
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Container@DROPDOWN_ROW_TEMPLATE:
|
||||
Height: 35
|
||||
Width: PARENT_RIGHT
|
||||
Children:
|
||||
Label@A_DESC:
|
||||
Width: 80
|
||||
Height: 25
|
||||
Text: Starting Cash:
|
||||
Align: Right
|
||||
DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
|
||||
Visible: False
|
||||
DropDownButton@A:
|
||||
X: 85
|
||||
Y: 110
|
||||
Width: 160
|
||||
Height: 25
|
||||
Font: Regular
|
||||
Text: $5000
|
||||
Label@STARTINGUNITS_DESC:
|
||||
X: PARENT_RIGHT - WIDTH - 165
|
||||
Y: 110
|
||||
Width: 120
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Label@B_DESC:
|
||||
X: PARENT_RIGHT - WIDTH - 183
|
||||
Width: 160
|
||||
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
|
||||
Visible: False
|
||||
DropDownButton@B:
|
||||
X: PARENT_RIGHT - WIDTH - 18
|
||||
Width: 160
|
||||
Height: 25
|
||||
Font: Regular
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
@@ -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
|
||||
ScrollPanel:
|
||||
Logic: LobbyOptionsLogic
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM
|
||||
Children:
|
||||
Container@LOBBY_OPTIONS:
|
||||
X: 18
|
||||
Y: 30
|
||||
Width: PARENT_RIGHT - 60
|
||||
Width: PARENT_RIGHT - 18 - 24
|
||||
Height: PARENT_BOTTOM - 75
|
||||
Children:
|
||||
Checkbox@EXPLORED_MAP_CHECKBOX:
|
||||
Width: 150
|
||||
Container@CHECKBOX_ROW_TEMPLATE:
|
||||
Height: 35
|
||||
Children:
|
||||
Checkbox@A:
|
||||
Width: 175
|
||||
Height: 20
|
||||
Text: Explored Map
|
||||
Checkbox@FOG_CHECKBOX:
|
||||
Y: 35
|
||||
Width: 150
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Checkbox@B:
|
||||
X: 195
|
||||
Width: 175
|
||||
Height: 20
|
||||
Text: Fog of War
|
||||
Checkbox@CRATES_CHECKBOX:
|
||||
X: 170
|
||||
Width: 225
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Checkbox@C:
|
||||
X: 375
|
||||
Width: 175
|
||||
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
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Container@DROPDOWN_ROW_TEMPLATE:
|
||||
Height: 35
|
||||
Width: PARENT_RIGHT
|
||||
Children:
|
||||
Label@A_DESC:
|
||||
Width: 80
|
||||
Height: 25
|
||||
Text: Starting Cash:
|
||||
Align: Right
|
||||
DropDownButton@STARTINGCASH_DROPDOWNBUTTON:
|
||||
Visible: False
|
||||
DropDownButton@A:
|
||||
X: 85
|
||||
Y: 110
|
||||
Width: 160
|
||||
Height: 25
|
||||
Font: Regular
|
||||
Text: $5000
|
||||
Label@STARTINGUNITS_DESC:
|
||||
X: PARENT_RIGHT - WIDTH - 165
|
||||
Y: 110
|
||||
Width: 120
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
Label@B_DESC:
|
||||
X: PARENT_RIGHT - WIDTH - 183
|
||||
Width: 160
|
||||
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
|
||||
Visible: False
|
||||
DropDownButton@B:
|
||||
X: PARENT_RIGHT - WIDTH - 18
|
||||
Width: 160
|
||||
Height: 25
|
||||
Font: Regular
|
||||
Visible: False
|
||||
TooltipContainer: TOOLTIP_CONTAINER
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user