untangling a few things

This commit is contained in:
Chris Forbes
2009-10-12 21:23:09 +13:00
parent 8a5e84e265
commit 711b419ed0
9 changed files with 92 additions and 241 deletions

View File

@@ -6,7 +6,8 @@ using System.Text;
using IjwFramework.Types;
using OpenRa.FileFormats;
using OpenRa.Game.GameRules;
using OpenRa.Game.Graphics;
using OpenRa.Game.Graphics;
using System.Drawing;
namespace OpenRa.Game
{
@@ -141,6 +142,16 @@ namespace OpenRa.Game
.Select( x => x.Order( this, game, xy ) )
.Where( x => x != null )
.FirstOrDefault();
}
public RectangleF Bounds
{
get
{
var size = SelectedSize;
var loc = CenterLocation - 0.5f * size;
return new RectangleF(loc.X, loc.Y, size.X, size.Y);
}
}
}