Merge pull request #11881 from reaperrr/always-visible-bar

Allow keeping empty selection bars visible
This commit is contained in:
Oliver Brakmann
2016-08-26 14:56:29 +02:00
committed by GitHub
11 changed files with 13 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Graphics
foreach (var extraBar in actor.TraitsImplementing<ISelectionBar>())
{
var value = extraBar.GetValue();
if (value != 0)
if (value != 0 || extraBar.DisplayWhenEmpty)
{
start.Y += (int)(4 / wr.Viewport.Zoom);
end.Y += (int)(4 / wr.Viewport.Zoom);

View File

@@ -280,7 +280,7 @@ namespace OpenRA.Traits
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
[RequireExplicitImplementation]
public interface ISelectionBar { float GetValue(); Color GetColor(); }
public interface ISelectionBar { float GetValue(); Color GetColor(); bool DisplayWhenEmpty { get; } }
public interface IPositionableInfo : ITraitInfoInterface { }
public interface IPositionable : IOccupySpace