Merge pull request #11881 from reaperrr/always-visible-bar
Allow keeping empty selection bars visible
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user