fix cnc chrome yaml issues
This commit is contained in:
@@ -22,15 +22,13 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
var panel = widget.GetWidget("CONQUEST_OBJECTIVES");
|
||||
panel.GetWidget<LabelWidget>("TITLE").GetText = () => "Conquest: " + world.Map.Title;
|
||||
|
||||
var objectiveCheckbox = panel.GetWidget<CheckboxWidget>("OBJECTIVE_CHECKBOX");
|
||||
objectiveCheckbox.IsDisabled = () => true;
|
||||
|
||||
var statusLabel = panel.GetWidget<LabelWidget>("STATUS_LABEL");
|
||||
var statusLabel = panel.GetWidget<LabelWidget>("STATUS");
|
||||
statusLabel.IsVisible = () => world.LocalPlayer != null;
|
||||
|
||||
if (world.LocalPlayer != null)
|
||||
{
|
||||
var lp = world.LocalPlayer;
|
||||
var objectiveCheckbox = panel.GetWidget<CheckboxWidget>("1");
|
||||
objectiveCheckbox.IsChecked = () => lp.WinState != WinState.Undefined;
|
||||
objectiveCheckbox.GetCheckType = () => lp.WinState == WinState.Won ?
|
||||
"checked" : "crossed";
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
BindOrderButton<RepairOrderGenerator>(world, sidebarRoot, "REPAIR_BUTTON", "repair");
|
||||
|
||||
var playerResources = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
|
||||
sidebarRoot.GetWidget<LabelWidget>("CASH_DISPLAY").GetText = () =>
|
||||
sidebarRoot.GetWidget<LabelWidget>("CASH").GetText = () =>
|
||||
"${0}".F(playerResources.DisplayCash + playerResources.DisplayOre);
|
||||
|
||||
queueTabs = playerWidgets.GetWidget<ProductionTabsWidget>("PRODUCTION_TABS");
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
{
|
||||
// Performance info
|
||||
var perfRoot = widget.GetWidget("PERFORMANCE_INFO");
|
||||
perfRoot.GetWidget("PERF_GRAPH").IsVisible = () => Game.Settings.Debug.PerfGraph;
|
||||
perfRoot.IsVisible = () => Game.Settings.Debug.PerfGraph;
|
||||
var text = perfRoot.GetWidget<LabelWidget>("PERF_TEXT");
|
||||
text.IsVisible = () => Game.Settings.Debug.PerfText;
|
||||
text.GetText = () =>
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
playerPalettePreview = world.WorldActor.Trait<ColorPickerPaletteModifier>();
|
||||
playerPalettePreview.Ramp = playerSettings.ColorRamp;
|
||||
|
||||
var colorDropdown = generalPane.GetWidget<DropDownButtonWidget>("COLOR_DROPDOWN");
|
||||
var colorDropdown = generalPane.GetWidget<DropDownButtonWidget>("COLOR");
|
||||
colorDropdown.OnMouseDown = _ => ShowColorPicker(colorDropdown, playerSettings);
|
||||
colorDropdown.GetWidget<ColorBlockWidget>("COLORBLOCK").GetColor = () => playerSettings.ColorRamp.GetColor(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user