unhacking IChromeButton.
This commit is contained in:
@@ -38,6 +38,9 @@ namespace OpenRA
|
|||||||
public static World world;
|
public static World world;
|
||||||
internal static Viewport viewport;
|
internal static Viewport viewport;
|
||||||
public static Controller controller;
|
public static Controller controller;
|
||||||
|
public static Widget RootWidget {
|
||||||
|
get { return Chrome.rootWidget; }
|
||||||
|
}
|
||||||
internal static Chrome chrome;
|
internal static Chrome chrome;
|
||||||
internal static UserSettings Settings;
|
internal static UserSettings Settings;
|
||||||
|
|
||||||
|
|||||||
@@ -229,6 +229,7 @@
|
|||||||
<Compile Include="Widgets\SliderWidget.cs" />
|
<Compile Include="Widgets\SliderWidget.cs" />
|
||||||
<Compile Include="Widgets\TimerWidget.cs" />
|
<Compile Include="Widgets\TimerWidget.cs" />
|
||||||
<Compile Include="Widgets\ShpImageWidget.cs" />
|
<Compile Include="Widgets\ShpImageWidget.cs" />
|
||||||
|
<Compile Include="Widgets\OrderButtonWidget.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
|
|||||||
@@ -150,16 +150,6 @@ namespace OpenRA.Traits
|
|||||||
void Cancel(Actor self);
|
void Cancel(Actor self);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IChromeButton
|
|
||||||
{
|
|
||||||
string Image { get; }
|
|
||||||
bool Enabled { get; }
|
|
||||||
bool Pressed { get; }
|
|
||||||
void OnClick();
|
|
||||||
string Description { get; }
|
|
||||||
string LongDesc { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IRenderOverlay { void Render(); }
|
public interface IRenderOverlay { void Render(); }
|
||||||
public interface INotifyIdle { void Idle(Actor self); }
|
public interface INotifyIdle { void Idle(Actor self); }
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Drawing;
|
|||||||
|
|
||||||
namespace OpenRA.Widgets
|
namespace OpenRA.Widgets
|
||||||
{
|
{
|
||||||
class ButtonWidget : Widget
|
public class ButtonWidget : Widget
|
||||||
{
|
{
|
||||||
public string Text = "";
|
public string Text = "";
|
||||||
public bool Bold = false;
|
public bool Bold = false;
|
||||||
|
|||||||
@@ -70,59 +70,6 @@ namespace OpenRA.Widgets
|
|||||||
x -= 14;
|
x -= 14;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var origin = new int2(Game.viewport.Width - 200, 2);
|
|
||||||
|
|
||||||
foreach (var cb in world.WorldActor.traits.WithInterface<IChromeButton>())
|
|
||||||
{
|
|
||||||
var state = cb.Enabled ? cb.Pressed ? "pressed" : "normal" : "disabled";
|
|
||||||
var image = ChromeProvider.GetImage(Game.chrome.renderer, cb.Image + "-button", state);
|
|
||||||
|
|
||||||
origin.X -= (int)image.size.X + chromeButtonGap;
|
|
||||||
|
|
||||||
var button = cb;
|
|
||||||
var rect = new Rectangle(origin.X, origin.Y, (int)image.size.X, (int)image.size.Y);
|
|
||||||
AddButton(rect, _ => { if (button.Enabled) button.OnClick(); });
|
|
||||||
|
|
||||||
if (rect.Contains(Game.chrome.lastMousePos.ToPoint()))
|
|
||||||
{
|
|
||||||
rect = rect.InflateBy(3, 3, 3, 3);
|
|
||||||
var pos = new int2(rect.Left, rect.Top);
|
|
||||||
var m = pos + new int2(rect.Width, rect.Height);
|
|
||||||
var br = pos + new int2(rect.Width, rect.Height + 20);
|
|
||||||
|
|
||||||
var u = Game.chrome.renderer.RegularFont.Measure(cb.LongDesc.Replace("\\n", "\n"));
|
|
||||||
|
|
||||||
br.X -= u.X;
|
|
||||||
br.Y += u.Y;
|
|
||||||
br += new int2(-15, 25);
|
|
||||||
|
|
||||||
var border = WidgetUtils.GetBorderSizes("dialog4");
|
|
||||||
|
|
||||||
WidgetUtils.DrawPanelPartial("dialog4", rect
|
|
||||||
.InflateBy(0, 0, 0, border[1]),
|
|
||||||
PanelSides.Top | PanelSides.Left | PanelSides.Right);
|
|
||||||
|
|
||||||
WidgetUtils.DrawPanelPartial("dialog4", new Rectangle(br.X, m.Y, pos.X - br.X, br.Y - m.Y)
|
|
||||||
.InflateBy(0, 0, border[3], 0),
|
|
||||||
PanelSides.Top | PanelSides.Left | PanelSides.Bottom);
|
|
||||||
|
|
||||||
WidgetUtils.DrawPanelPartial("dialog4", new Rectangle(pos.X, m.Y, m.X - pos.X, br.Y - m.Y)
|
|
||||||
.InflateBy(border[2], border[0], 0, 0),
|
|
||||||
PanelSides.Right | PanelSides.Bottom);
|
|
||||||
|
|
||||||
pos.X = br.X + 8;
|
|
||||||
pos.Y = m.Y + 8;
|
|
||||||
Game.chrome.renderer.BoldFont.DrawText(cb.Description, pos, Color.White);
|
|
||||||
|
|
||||||
pos += new int2(0, 20);
|
|
||||||
Game.chrome.renderer.RegularFont.DrawText(cb.LongDesc.Replace("\\n", "\n"), pos, Color.White);
|
|
||||||
}
|
|
||||||
|
|
||||||
Game.chrome.renderer.RgbaSpriteRenderer.DrawSprite(image, origin, "chrome");
|
|
||||||
}
|
|
||||||
|
|
||||||
Game.chrome.renderer.RgbaSpriteRenderer.Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandleInput(MouseInput mi)
|
public override bool HandleInput(MouseInput mi)
|
||||||
@@ -137,7 +84,6 @@ namespace OpenRA.Widgets
|
|||||||
action(mi);
|
action(mi);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
66
OpenRA.Game/Widgets/OrderButtonWidget.cs
Normal file
66
OpenRA.Game/Widgets/OrderButtonWidget.cs
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
using System;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
using System.Drawing;
|
||||||
|
namespace OpenRA.Widgets
|
||||||
|
{
|
||||||
|
public class OrderButtonWidget : ButtonWidget
|
||||||
|
{
|
||||||
|
public Func<bool> Enabled = () => true;
|
||||||
|
public Func<bool> Pressed = () => false;
|
||||||
|
|
||||||
|
public string Image, Description, LongDesc = "";
|
||||||
|
|
||||||
|
public Func<string> GetImage, GetDescription, GetLongDesc;
|
||||||
|
|
||||||
|
public OrderButtonWidget()
|
||||||
|
{
|
||||||
|
GetImage = () => Enabled() ? Pressed() ? "pressed" : "normal" : "disabled";
|
||||||
|
GetDescription = () => Description;
|
||||||
|
GetLongDesc = () => LongDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawInner (World world)
|
||||||
|
{
|
||||||
|
var image = ChromeProvider.GetImage(Game.chrome.renderer, Image + "-button", GetImage());
|
||||||
|
var rect = new Rectangle(RenderBounds.X, RenderBounds.Y, (int)image.size.X, (int)image.size.Y);
|
||||||
|
|
||||||
|
if (rect.Contains(Game.chrome.lastMousePos.ToPoint()))
|
||||||
|
{
|
||||||
|
rect = rect.InflateBy(3, 3, 3, 3);
|
||||||
|
var pos = new int2(rect.Left, rect.Top);
|
||||||
|
var m = pos + new int2(rect.Width, rect.Height);
|
||||||
|
var br = pos + new int2(rect.Width, rect.Height + 20);
|
||||||
|
|
||||||
|
var u = Game.chrome.renderer.RegularFont.Measure(GetLongDesc().Replace("\\n", "\n"));
|
||||||
|
|
||||||
|
br.X -= u.X;
|
||||||
|
br.Y += u.Y;
|
||||||
|
br += new int2(-15, 25);
|
||||||
|
|
||||||
|
var border = WidgetUtils.GetBorderSizes("dialog4");
|
||||||
|
|
||||||
|
WidgetUtils.DrawPanelPartial("dialog4", rect
|
||||||
|
.InflateBy(0, 0, 0, border[1]),
|
||||||
|
PanelSides.Top | PanelSides.Left | PanelSides.Right);
|
||||||
|
|
||||||
|
WidgetUtils.DrawPanelPartial("dialog4", new Rectangle(br.X, m.Y, pos.X - br.X, br.Y - m.Y)
|
||||||
|
.InflateBy(0, 0, border[3], 0),
|
||||||
|
PanelSides.Top | PanelSides.Left | PanelSides.Bottom);
|
||||||
|
|
||||||
|
WidgetUtils.DrawPanelPartial("dialog4", new Rectangle(pos.X, m.Y, m.X - pos.X, br.Y - m.Y)
|
||||||
|
.InflateBy(border[2], border[0], 0, 0),
|
||||||
|
PanelSides.Right | PanelSides.Bottom);
|
||||||
|
|
||||||
|
pos.X = br.X + 8;
|
||||||
|
pos.Y = m.Y + 8;
|
||||||
|
Game.chrome.renderer.BoldFont.DrawText(GetDescription(), pos, Color.White);
|
||||||
|
|
||||||
|
pos += new int2(0, 20);
|
||||||
|
Game.chrome.renderer.RegularFont.DrawText(GetLongDesc().Replace("\\n", "\n"), pos, Color.White);
|
||||||
|
}
|
||||||
|
|
||||||
|
Game.chrome.renderer.RgbaSpriteRenderer.DrawSprite(image, new int2(RenderBounds.X, RenderBounds.Y), "chrome");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see LICENSE.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using OpenRA.Mods.RA.Orders;
|
|
||||||
using OpenRA.Traits;
|
|
||||||
|
|
||||||
// TODO: Migrate these to be real widgets, and kill all the weird infrastructure that's holding these up.
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
|
||||||
{
|
|
||||||
class PowerDownButtonInfo : TraitInfo<PowerDownButton> { }
|
|
||||||
|
|
||||||
class PowerDownButton : IChromeButton
|
|
||||||
{
|
|
||||||
public string Image { get { return "power"; } }
|
|
||||||
public bool Enabled { get { return true; } }
|
|
||||||
public bool Pressed { get { return Game.controller.orderGenerator is PowerDownOrderGenerator; } }
|
|
||||||
public void OnClick() { Game.controller.ToggleInputMode<PowerDownOrderGenerator>(); }
|
|
||||||
|
|
||||||
public string Description { get { return "Powerdown"; } }
|
|
||||||
public string LongDesc { get { return "Disable unneeded structures so their \npower can be used elsewhere"; } }
|
|
||||||
}
|
|
||||||
|
|
||||||
class SellButtonInfo : TraitInfo<SellButton> { }
|
|
||||||
|
|
||||||
class SellButton : IChromeButton
|
|
||||||
{
|
|
||||||
public string Image { get { return "sell"; } }
|
|
||||||
public bool Enabled { get { return true; } }
|
|
||||||
public bool Pressed { get { return Game.controller.orderGenerator is SellOrderGenerator; } }
|
|
||||||
public void OnClick() { Game.controller.ToggleInputMode<SellOrderGenerator>(); }
|
|
||||||
|
|
||||||
public string Description { get { return "Sell"; } }
|
|
||||||
public string LongDesc { get { return "Sell buildings, reclaiming a \nproportion of their build cost"; } }
|
|
||||||
}
|
|
||||||
|
|
||||||
class RepairButtonInfo : ITraitInfo
|
|
||||||
{
|
|
||||||
public readonly bool RequiresConstructionYard = true;
|
|
||||||
public object Create(ActorInitializer init) { return new RepairButton(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
class RepairButton : IChromeButton
|
|
||||||
{
|
|
||||||
public RepairButton() { }
|
|
||||||
|
|
||||||
public string Image { get { return "repair"; } }
|
|
||||||
public bool Enabled
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
// WTF: why are these buttons even traits?
|
|
||||||
return RepairOrderGenerator.PlayerIsAllowedToRepair( Game.world );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Pressed { get { return Game.controller.orderGenerator is RepairOrderGenerator; } }
|
|
||||||
public void OnClick() { Game.controller.ToggleInputMode<RepairOrderGenerator>(); }
|
|
||||||
|
|
||||||
public string Description { get { return "Repair"; } }
|
|
||||||
public string LongDesc
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var s = "Repair damaged buildings";
|
|
||||||
return Enabled ? s : s + "\n\nRequires: Construction Yard";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -107,7 +107,6 @@
|
|||||||
<Compile Include="CanPowerDown.cs" />
|
<Compile Include="CanPowerDown.cs" />
|
||||||
<Compile Include="Cargo.cs" />
|
<Compile Include="Cargo.cs" />
|
||||||
<Compile Include="CarpetBomb.cs" />
|
<Compile Include="CarpetBomb.cs" />
|
||||||
<Compile Include="Chrome\PowerDownButton.cs" />
|
|
||||||
<Compile Include="Crates\LevelUpCrateAction.cs" />
|
<Compile Include="Crates\LevelUpCrateAction.cs" />
|
||||||
<Compile Include="Orders\PowerDownOrderGenerator.cs" />
|
<Compile Include="Orders\PowerDownOrderGenerator.cs" />
|
||||||
<Compile Include="Orders\RepairOrderGenerator.cs" />
|
<Compile Include="Orders\RepairOrderGenerator.cs" />
|
||||||
@@ -208,6 +207,7 @@
|
|||||||
<Compile Include="TransformsOnDeploy.cs" />
|
<Compile Include="TransformsOnDeploy.cs" />
|
||||||
<Compile Include="Activities\TransformIntoActor.cs" />
|
<Compile Include="Activities\TransformIntoActor.cs" />
|
||||||
<Compile Include="PaletteFromCurrentTheatre.cs" />
|
<Compile Include="PaletteFromCurrentTheatre.cs" />
|
||||||
|
<Compile Include="Widgets\Delegates\OrderButtonsChromeDelegate.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
@@ -236,6 +236,6 @@ ralint ra</PostBuildEvent>
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Widgets\" />
|
<Folder Include="Widgets\" />
|
||||||
<Folder Include="Widgets\Delegates\" />
|
<Folder Include="Widgets\Delegates\" />
|
||||||
<Folder Include="Widgets\Delegates\" />
|
<Folder Include="Chrome\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -48,9 +48,6 @@ namespace OpenRA.Mods.RA.Orders
|
|||||||
|
|
||||||
public static bool PlayerIsAllowedToRepair( World world )
|
public static bool PlayerIsAllowedToRepair( World world )
|
||||||
{
|
{
|
||||||
if( !world.WorldActor.Info.Traits.Get<RepairButtonInfo>().RequiresConstructionYard )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return Game.world.Queries.OwnedBy[ Game.world.LocalPlayer ]
|
return Game.world.Queries.OwnedBy[ Game.world.LocalPlayer ]
|
||||||
.WithTrait<Production>().Where( x => x.Actor.Info.Traits.Get<ProductionInfo>().Produces.Contains( "Building" ) )
|
.WithTrait<Production>().Where( x => x.Actor.Info.Traits.Get<ProductionInfo>().Produces.Contains( "Building" ) )
|
||||||
.Any();
|
.Any();
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see LICENSE.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Mods.RA.Orders;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||||
|
{
|
||||||
|
public class OrderButtonsChromeDelegate : IWidgetDelegate
|
||||||
|
{
|
||||||
|
public OrderButtonsChromeDelegate()
|
||||||
|
{
|
||||||
|
var r = Game.RootWidget;
|
||||||
|
var gameRoot = r.GetWidget("INGAME_ROOT");
|
||||||
|
|
||||||
|
var moneybin = gameRoot.GetWidget("INGAME_MONEY_BIN");
|
||||||
|
|
||||||
|
var sell = moneybin.GetWidget<OrderButtonWidget>("SELL");
|
||||||
|
if (sell != null)
|
||||||
|
{
|
||||||
|
sell.Pressed = () => Game.controller.orderGenerator is SellOrderGenerator;
|
||||||
|
sell.OnMouseDown = mi => { Game.controller.ToggleInputMode<SellOrderGenerator>(); return true; };
|
||||||
|
}
|
||||||
|
|
||||||
|
var powerdown = moneybin.GetWidget<OrderButtonWidget>("POWER_DOWN");
|
||||||
|
if (powerdown != null)
|
||||||
|
{
|
||||||
|
powerdown.Pressed = () => Game.controller.orderGenerator is PowerDownOrderGenerator;
|
||||||
|
powerdown.OnMouseDown = mi => { Game.controller.ToggleInputMode<PowerDownOrderGenerator>(); return true; };
|
||||||
|
}
|
||||||
|
|
||||||
|
var repair = moneybin.GetWidget<OrderButtonWidget>("REPAIR");
|
||||||
|
if (repair != null)
|
||||||
|
{
|
||||||
|
repair.Enabled = () => { return RepairOrderGenerator.PlayerIsAllowedToRepair( Game.world ); };
|
||||||
|
repair.Pressed = () => Game.controller.orderGenerator is RepairOrderGenerator;
|
||||||
|
repair.OnMouseDown = mi => { Game.controller.ToggleInputMode<RepairOrderGenerator>(); return true; };
|
||||||
|
repair.GetLongDesc = () => { return repair.Enabled() ? repair.LongDesc : repair.LongDesc + "\n\nRequires: Construction Yard"; };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,6 +77,27 @@ Container@ROOT:
|
|||||||
Width:320
|
Width:320
|
||||||
Height: 32
|
Height: 32
|
||||||
SplitOreAndCash: yes
|
SplitOreAndCash: yes
|
||||||
|
Children:
|
||||||
|
OrderButton@SELL:
|
||||||
|
Id:SELL
|
||||||
|
Delegate:OrderButtonsChromeDelegate
|
||||||
|
X:39
|
||||||
|
Y:0
|
||||||
|
Width:30
|
||||||
|
Height:30
|
||||||
|
Image:sell
|
||||||
|
Description:Sell
|
||||||
|
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
|
||||||
|
OrderButton@REPAIR:
|
||||||
|
Id:REPAIR
|
||||||
|
Delegate:OrderButtonsChromeDelegate
|
||||||
|
X:75
|
||||||
|
Y:0
|
||||||
|
Width:30
|
||||||
|
Height:30
|
||||||
|
Image:repair
|
||||||
|
Description:Repair
|
||||||
|
LongDesc:Repair damaged buildings
|
||||||
Background@INGAME_OPTIONS_BG:
|
Background@INGAME_OPTIONS_BG:
|
||||||
Id:INGAME_OPTIONS_BG
|
Id:INGAME_OPTIONS_BG
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
|
|||||||
@@ -94,8 +94,6 @@ World:
|
|||||||
Country@nod:
|
Country@nod:
|
||||||
Name: Nod
|
Name: Nod
|
||||||
Race: nod
|
Race: nod
|
||||||
SellButton:
|
|
||||||
RepairButton:
|
|
||||||
ChoosePaletteOnSelect:
|
ChoosePaletteOnSelect:
|
||||||
BibLayer:
|
BibLayer:
|
||||||
ResourceLayer:
|
ResourceLayer:
|
||||||
|
|||||||
@@ -74,6 +74,37 @@ Container@ROOT:
|
|||||||
Width:320
|
Width:320
|
||||||
Height: 32
|
Height: 32
|
||||||
SplitOreAndCash:No
|
SplitOreAndCash:No
|
||||||
|
Children:
|
||||||
|
OrderButton@SELL:
|
||||||
|
Id:SELL
|
||||||
|
Delegate:OrderButtonsChromeDelegate
|
||||||
|
X:3
|
||||||
|
Y:0
|
||||||
|
Width:30
|
||||||
|
Height:30
|
||||||
|
Image:sell
|
||||||
|
Description:Sell
|
||||||
|
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
|
||||||
|
OrderButton@POWER_DOWN:
|
||||||
|
Id:POWER_DOWN
|
||||||
|
Delegate:OrderButtonsChromeDelegate
|
||||||
|
X:39
|
||||||
|
Y:0
|
||||||
|
Width:30
|
||||||
|
Height:30
|
||||||
|
Image:power
|
||||||
|
Description:Powerdown
|
||||||
|
LongDesc:Disable unneeded structures so their \npower can be used elsewhere
|
||||||
|
OrderButton@REPAIR:
|
||||||
|
Id:REPAIR
|
||||||
|
Delegate:OrderButtonsChromeDelegate
|
||||||
|
X:75
|
||||||
|
Y:0
|
||||||
|
Width:30
|
||||||
|
Height:30
|
||||||
|
Image:repair
|
||||||
|
Description:Repair
|
||||||
|
LongDesc:Repair damaged buildings
|
||||||
Background@INGAME_OPTIONS_BG:
|
Background@INGAME_OPTIONS_BG:
|
||||||
Id:INGAME_OPTIONS_BG
|
Id:INGAME_OPTIONS_BG
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
|
|||||||
@@ -148,9 +148,6 @@ World:
|
|||||||
Country@1:
|
Country@1:
|
||||||
Name: Soviet
|
Name: Soviet
|
||||||
Race: soviet
|
Race: soviet
|
||||||
SellButton:
|
|
||||||
RepairButton:
|
|
||||||
PowerDownButton:
|
|
||||||
BibLayer:
|
BibLayer:
|
||||||
ResourceLayer:
|
ResourceLayer:
|
||||||
ResourceType@ore:
|
ResourceType@ore:
|
||||||
|
|||||||
Reference in New Issue
Block a user