Add support for diamond cell grids.
This commit is contained in:
@@ -129,9 +129,10 @@ namespace OpenRA.Widgets
|
||||
tooltipContainer.Value.RemoveTooltip();
|
||||
}
|
||||
|
||||
public int2 ConvertToPreview(CPos point)
|
||||
public int2 ConvertToPreview(CPos cell)
|
||||
{
|
||||
var preview = Preview();
|
||||
var point = Map.CellToMap(preview.Map.TileShape, cell);
|
||||
var dx = (int)(previewScale * (point.X - preview.Bounds.Left));
|
||||
var dy = (int)(previewScale * (point.Y - preview.Bounds.Top));
|
||||
return new int2(mapRect.X + dx, mapRect.Y + dy);
|
||||
|
||||
Reference in New Issue
Block a user