customisable text printed on RA support power icons
This commit is contained in:
@@ -20,6 +20,9 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
{
|
{
|
||||||
class SupportPowerBinWidget : Widget
|
class SupportPowerBinWidget : Widget
|
||||||
{
|
{
|
||||||
|
public string ReadyText = "";
|
||||||
|
public string HoldText = "";
|
||||||
|
|
||||||
Dictionary<string, Sprite> spsprites;
|
Dictionary<string, Sprite> spsprites;
|
||||||
Animation clock;
|
Animation clock;
|
||||||
readonly List<Pair<Rectangle, Action<MouseInput>>> buttons = new List<Pair<Rectangle,Action<MouseInput>>>();
|
readonly List<Pair<Rectangle, Action<MouseInput>>> buttons = new List<Pair<Rectangle,Action<MouseInput>>>();
|
||||||
@@ -148,7 +151,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
|
|
||||||
WidgetUtils.DrawSHP(clock.Image, drawPos, worldRenderer);
|
WidgetUtils.DrawSHP(clock.Image, drawPos, worldRenderer);
|
||||||
|
|
||||||
var overlay = sp.Ready ? "READY" : sp.Active ? null : "ON HOLD";
|
var overlay = sp.Ready ? ReadyText : sp.Active ? null : HoldText;
|
||||||
var font = Game.Renderer.Fonts["TinyBold"];
|
var font = Game.Renderer.Fonts["TinyBold"];
|
||||||
if (overlay != null)
|
if (overlay != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ Container@INGAME_ROOT:
|
|||||||
SupportPowerBin@INGAME_POWERS_BIN:
|
SupportPowerBin@INGAME_POWERS_BIN:
|
||||||
X:0
|
X:0
|
||||||
Y:25
|
Y:25
|
||||||
|
ReadyText: READY
|
||||||
|
HoldText: ON HOLD
|
||||||
BuildPalette@INGAME_BUILD_PALETTE:
|
BuildPalette@INGAME_BUILD_PALETTE:
|
||||||
X:WINDOW_RIGHT - 250
|
X:WINDOW_RIGHT - 250
|
||||||
Y:280
|
Y:280
|
||||||
|
|||||||
Reference in New Issue
Block a user