Improved SelectionDecoration description & removed ISelectionDecoration interface

This commit is contained in:
reaperrr
2015-06-17 21:37:24 +02:00
parent b6bbd11c83
commit 2986277490
2 changed files with 4 additions and 9 deletions

View File

@@ -110,11 +110,6 @@ namespace OpenRA.Traits
public interface ISeedableResource { void Seed(Actor self); }
public interface ISelectionDecorations
{
ISelectionDecorationsInfo SelectionDecorationsInfo { get; }
}
public interface ISelectionDecorationsInfo
{
int[] SelectionBoxBounds { get; }

View File

@@ -21,7 +21,9 @@ namespace OpenRA.Mods.Common.Traits
{
public readonly string Palette = "chrome";
[Desc("Visual bounds for selection box. If null, it uses AutoSelectionSize.")]
[Desc("Visual bounds for selection box. If null, it uses AutoSelectionSize.",
"The first two values define the bounds' size, the optional third and fourth",
"values specify the position relative to the actors' center. Defaults to selectable bounds.")]
public readonly int[] VisualBounds = null;
[Desc("Health bar, production progress bar etc.")]
@@ -36,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
public int[] SelectionBoxBounds { get { return VisualBounds; } }
}
public class SelectionDecorations : ISelectionDecorations, IPostRenderSelection
public class SelectionDecorations : IPostRenderSelection
{
// depends on the order of pips in TraitsInterfaces.cs!
static readonly string[] PipStrings = { "pip-empty", "pip-green", "pip-yellow", "pip-red", "pip-gray", "pip-blue", "pip-ammo", "pip-ammoempty" };
@@ -45,8 +47,6 @@ namespace OpenRA.Mods.Common.Traits
public readonly SelectionDecorationsInfo Info;
readonly Actor self;
public ISelectionDecorationsInfo SelectionDecorationsInfo { get { return Info; } }
public SelectionDecorations(Actor self, SelectionDecorationsInfo info)
{
this.self = self;