Fix SupportPowers ClockAnimation being ignored.
This commit is contained in:
committed by
Gustas
parent
df484633f7
commit
acc2c11e69
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
readonly SupportPowerManager spm;
|
readonly SupportPowerManager spm;
|
||||||
|
|
||||||
Animation icon;
|
Animation icon;
|
||||||
readonly Animation clock;
|
Animation clock;
|
||||||
Dictionary<Rectangle, SupportPowerIcon> icons = new Dictionary<Rectangle, SupportPowerIcon>();
|
Dictionary<Rectangle, SupportPowerIcon> icons = new Dictionary<Rectangle, SupportPowerIcon>();
|
||||||
|
|
||||||
public SupportPowerIcon TooltipIcon { get; private set; }
|
public SupportPowerIcon TooltipIcon { get; private set; }
|
||||||
@@ -97,8 +97,6 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
spm = world.LocalPlayer.PlayerActor.Trait<SupportPowerManager>();
|
spm = world.LocalPlayer.PlayerActor.Trait<SupportPowerManager>();
|
||||||
tooltipContainer = Exts.Lazy(() =>
|
tooltipContainer = Exts.Lazy(() =>
|
||||||
Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||||
|
|
||||||
clock = new Animation(world, ClockAnimation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize(WidgetArgs args)
|
public override void Initialize(WidgetArgs args)
|
||||||
@@ -113,6 +111,8 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
iconOffset = 0.5f * IconSize.ToFloat2() + IconSpriteOffset;
|
iconOffset = 0.5f * IconSize.ToFloat2() + IconSpriteOffset;
|
||||||
holdOffset = iconOffset - overlayFont.Measure(HoldText) / 2;
|
holdOffset = iconOffset - overlayFont.Measure(HoldText) / 2;
|
||||||
readyOffset = iconOffset - overlayFont.Measure(ReadyText) / 2;
|
readyOffset = iconOffset - overlayFont.Measure(ReadyText) / 2;
|
||||||
|
|
||||||
|
clock = new Animation(worldRenderer.World, ClockAnimation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SupportPowerIcon
|
public class SupportPowerIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user