try to make selection feel better

This commit is contained in:
Chris Forbes
2012-07-01 18:31:46 +12:00
parent 61c3932340
commit b8a932a084

View File

@@ -203,7 +203,7 @@ namespace OpenRA.Editor
else if (IsPaste)
PasteSelection();
else
SelectionEnd = GetBrushLocation();
SelectionEnd = GetBrushLocationBR();
}
protected override void OnMouseDown(MouseEventArgs e)
@@ -294,6 +294,14 @@ namespace OpenRA.Editor
return new CPos(vX / TileSet.TileSize, vY / TileSet.TileSize);
}
public CPos GetBrushLocationBR()
{
var vX = (int)Math.Floor((MousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((MousePos.Y - Offset.Y) / Zoom);
return new CPos((vX + TileSet.TileSize - 1) / TileSet.TileSize,
(vY + TileSet.TileSize - 1) / TileSet.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;