Include selection decorations when calculating ScreenMap bounds.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public override object Create(ActorInitializer init) { return new IsometricSelectionDecorations(init.Self, this); }
|
||||
}
|
||||
|
||||
public class IsometricSelectionDecorations : SelectionDecorationsBase
|
||||
public class IsometricSelectionDecorations : SelectionDecorationsBase, IRender
|
||||
{
|
||||
readonly IsometricSelectable selectable;
|
||||
|
||||
@@ -61,5 +61,15 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
var bounds = selectable.DecorationBounds(self, wr);
|
||||
yield return new IsometricSelectionBarsAnnotationRenderable(self, bounds, displayHealth, displayExtra);
|
||||
}
|
||||
|
||||
IEnumerable<IRenderable> IRender.Render(Actor self, WorldRenderer wr)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
IEnumerable<Rectangle> IRender.ScreenBounds(Actor self, WorldRenderer wr)
|
||||
{
|
||||
yield return selectable.DecorationBounds(self, wr).BoundingRect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user