Rename enum TileShape to MapGridType

This commit is contained in:
Pavel Penev
2015-10-01 00:48:01 +03:00
parent 06ba175fde
commit bb3aea338a
17 changed files with 63 additions and 71 deletions

View File

@@ -130,11 +130,11 @@ namespace OpenRA.Mods.Common.Widgets
tooltipContainer.Value.RemoveTooltip();
}
public int2 ConvertToPreview(CPos cell, TileShape gridType)
public int2 ConvertToPreview(CPos cell, MapGridType gridType)
{
var preview = Preview();
var point = cell.ToMPos(gridType);
var cellWidth = gridType == TileShape.Diamond ? 2 : 1;
var cellWidth = gridType == MapGridType.Diamond ? 2 : 1;
var dx = (int)(previewScale * cellWidth * (point.U - preview.Bounds.Left));
var dy = (int)(previewScale * (point.V - preview.Bounds.Top));