Move SupportPowerInstance out of SupportPowerManager
This commit is contained in:
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
var baseHeight = widget.Bounds.Height;
|
var baseHeight = widget.Bounds.Height;
|
||||||
var timeOffset = timeLabel.Bounds.X;
|
var timeOffset = timeLabel.Bounds.X;
|
||||||
|
|
||||||
SupportPowerManager.SupportPowerInstance lastPower = null;
|
SupportPowerInstance lastPower = null;
|
||||||
tooltipContainer.BeforeRender = () =>
|
tooltipContainer.BeforeRender = () =>
|
||||||
{
|
{
|
||||||
var sp = palette.TooltipPower;
|
var sp = palette.TooltipPower;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
|||||||
|
|
||||||
public readonly string TooltipContainer;
|
public readonly string TooltipContainer;
|
||||||
public readonly string TooltipTemplate = "SUPPORT_POWER_TOOLTIP";
|
public readonly string TooltipTemplate = "SUPPORT_POWER_TOOLTIP";
|
||||||
public SupportPowerManager.SupportPowerInstance TooltipPower { get; private set; }
|
public SupportPowerInstance TooltipPower { get; private set; }
|
||||||
Lazy<TooltipContainerWidget> tooltipContainer;
|
Lazy<TooltipContainerWidget> tooltipContainer;
|
||||||
|
|
||||||
Rectangle eventBounds;
|
Rectangle eventBounds;
|
||||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
|||||||
|
|
||||||
public class SupportPowerIcon
|
public class SupportPowerIcon
|
||||||
{
|
{
|
||||||
public SupportPowerManager.SupportPowerInstance Power;
|
public SupportPowerInstance Power;
|
||||||
public float2 Pos;
|
public float2 Pos;
|
||||||
public Sprite Sprite;
|
public Sprite Sprite;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ namespace OpenRA.Mods.RA
|
|||||||
return a.TraitsImplementing<SupportPower>()
|
return a.TraitsImplementing<SupportPower>()
|
||||||
.Select(t => Powers[MakeKey(t)]);
|
.Select(t => Powers[MakeKey(t)]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class SupportPowerInstance
|
public class SupportPowerInstance
|
||||||
{
|
{
|
||||||
@@ -190,7 +191,6 @@ namespace OpenRA.Mods.RA
|
|||||||
Disabled = true;
|
Disabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public class SelectGenericPowerTarget : IOrderGenerator
|
public class SelectGenericPowerTarget : IOrderGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static string GetOverlayForItem(SupportPowerManager.SupportPowerInstance item)
|
static string GetOverlayForItem(SupportPowerInstance item)
|
||||||
{
|
{
|
||||||
if (item.Disabled) return "ON HOLD";
|
if (item.Disabled) return "ON HOLD";
|
||||||
if (item.Ready) return "READY";
|
if (item.Ready) return "READY";
|
||||||
|
|||||||
Reference in New Issue
Block a user