Hide Chrome once we have Won or Lost
This commit is contained in:
@@ -24,6 +24,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var gameRoot = r.GetWidget("INGAME_ROOT");
|
var gameRoot = r.GetWidget("INGAME_ROOT");
|
||||||
|
|
||||||
var moneybin = gameRoot.GetWidget("INGAME_MONEY_BIN");
|
var moneybin = gameRoot.GetWidget("INGAME_MONEY_BIN");
|
||||||
|
moneybin.IsVisible = () => {
|
||||||
|
return world.LocalPlayer.WinState == WinState.Undefined;
|
||||||
|
};
|
||||||
|
|
||||||
BindOrderButton<SellOrderGenerator>(world, moneybin, "SELL");
|
BindOrderButton<SellOrderGenerator>(world, moneybin, "SELL");
|
||||||
BindOrderButton<PowerDownOrderGenerator>(world, moneybin, "POWER_DOWN");
|
BindOrderButton<PowerDownOrderGenerator>(world, moneybin, "POWER_DOWN");
|
||||||
BindOrderButton<RepairOrderGenerator>(world, moneybin, "REPAIR");
|
BindOrderButton<RepairOrderGenerator>(world, moneybin, "REPAIR");
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
if( world.LocalPlayer == null ) return;
|
if( world.LocalPlayer == null ) return;
|
||||||
|
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
|
||||||
|
|
||||||
var digitCollection = "digits-" + world.LocalPlayer.Country.Race;
|
var digitCollection = "digits-" + world.LocalPlayer.Country.Race;
|
||||||
var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;
|
var chromeCollection = "chrome-" + world.LocalPlayer.Country.Race;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
if( world.LocalPlayer == null ) return;
|
if( world.LocalPlayer == null ) return;
|
||||||
|
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
|
||||||
|
|
||||||
var radarBin = Widget.RootWidget.GetWidget<RadarBinWidget>(RadarBin);
|
var radarBin = Widget.RootWidget.GetWidget<RadarBinWidget>(RadarBin);
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
if( world == null || world.LocalPlayer == null ) return;
|
if( world == null || world.LocalPlayer == null ) return;
|
||||||
|
if( world.LocalPlayer.WinState != WinState.Undefined ) return;
|
||||||
|
|
||||||
radarCollection = "radar-" + world.LocalPlayer.Country.Race;
|
radarCollection = "radar-" + world.LocalPlayer.Country.Race;
|
||||||
var rsr = Game.Renderer.RgbaSpriteRenderer;
|
var rsr = Game.Renderer.RgbaSpriteRenderer;
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
if (world == null) return;
|
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 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);
|
var s = new float2(mapRect.Size.Width, mapRect.Size.Height*radarMinimapHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user