fix cnc chrome yaml issues

This commit is contained in:
Chris Forbes
2012-03-16 18:39:01 +13:00
parent 062c49dac3
commit 3e0f52db1a
9 changed files with 31 additions and 74 deletions

View File

@@ -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";

View File

@@ -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");

View File

@@ -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 = () =>

View File

@@ -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);