Hide Chrome once we have Won or Lost

This commit is contained in:
Mark Olson
2011-11-22 22:49:26 -06:00
committed by Chris Forbes
parent bf222425fc
commit 2bb968d0d3
5 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var gameRoot = r.GetWidget("INGAME_ROOT");
var moneybin = gameRoot.GetWidget("INGAME_MONEY_BIN");
moneybin.IsVisible = () => {
return world.LocalPlayer.WinState == WinState.Undefined;
};
BindOrderButton<SellOrderGenerator>(world, moneybin, "SELL");
BindOrderButton<PowerDownOrderGenerator>(world, moneybin, "POWER_DOWN");
BindOrderButton<RepairOrderGenerator>(world, moneybin, "REPAIR");

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Mods.RA.Widgets
public override void Draw()
{
if( world.LocalPlayer == null ) return;
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
var digitCollection = "digits-" + world.LocalPlayer.Country.Race;
var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;

View File

@@ -51,6 +51,7 @@ namespace OpenRA.Mods.RA.Widgets
public override void Draw()
{
if( world.LocalPlayer == null ) return;
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
var radarBin = Widget.RootWidget.GetWidget<RadarBinWidget>(RadarBin);

View File

@@ -131,6 +131,7 @@ namespace OpenRA.Mods.RA.Widgets
public override void Draw()
{
if( world == null || world.LocalPlayer == null ) return;
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
radarCollection = "radar-" + world.LocalPlayer.Country.Race;
var rsr = Game.Renderer.RgbaSpriteRenderer;

View File

@@ -124,6 +124,7 @@ namespace OpenRA.Mods.RA.Widgets
public override void Draw()
{
if (world == null) return;
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
var o = new float2(mapRect.Location.X, mapRect.Location.Y + world.Map.Bounds.Height * previewScale * (1 - radarMinimapHeight)/2);
var s = new float2(mapRect.Size.Width, mapRect.Size.Height*radarMinimapHeight);