reintroduce Cached<T>; use for Actor.Bounds, Actor.ExtendedBounds, which replace Actor.GetBounds(bool)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public void RenderAfterWorld (WorldRenderer wr, Actor self)
|
||||
{
|
||||
var bounds = self.GetBounds(false);
|
||||
var bounds = self.Bounds.Value;
|
||||
Color selectionColor = Color.White;
|
||||
|
||||
var xy = new float2(bounds.Left, bounds.Top);
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public void DrawRollover(WorldRenderer wr, Actor self)
|
||||
{
|
||||
var bounds = self.GetBounds(false);
|
||||
var bounds = self.Bounds.Value;
|
||||
|
||||
var xy = new float2(bounds.Left, bounds.Top);
|
||||
var Xy = new float2(bounds.Right, bounds.Top);
|
||||
@@ -184,10 +184,12 @@ namespace OpenRA.Traits
|
||||
var thisRow = pips.GetPips(self);
|
||||
if (thisRow == null)
|
||||
continue;
|
||||
|
||||
var width = self.Bounds.Value.Width;
|
||||
|
||||
foreach (var pip in thisRow)
|
||||
{
|
||||
if (pipxyOffset.X+5 > self.GetBounds(false).Width)
|
||||
if (pipxyOffset.X+5 > width)
|
||||
{
|
||||
pipxyOffset.X = 0;
|
||||
pipxyOffset.Y -= 4;
|
||||
|
||||
Reference in New Issue
Block a user