Rework multi-resolution sprite handling:
- Sprite.Bounds now refers to rectangles in the source image. Use this when copying pixels, etc. - Sprite.Size now refers to sizes in effective pixel coordinates. Use this when rendering. - Sheet.DPIScale has been removed. - "Density" term is introduced to refer to the number of artwork pixels per effective pixel.
This commit is contained in:
@@ -252,7 +252,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (!orderManager.LocalClient.IsObserver && orderManager.LocalClient.State == Session.ClientState.Ready)
|
||||
return;
|
||||
|
||||
var spawnSize = new float2(ChromeProvider.GetImage("lobby-bits", "spawn-unclaimed").Bounds.Size);
|
||||
var spawnSize = ChromeProvider.GetImage("lobby-bits", "spawn-unclaimed").Size.XY;
|
||||
var selectedSpawn = preview.SpawnPoints
|
||||
.Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(sp, preview.GridType), i))
|
||||
.Where(a => ((a.First - mi.Location).ToFloat2() / spawnSize * 2).LengthSquared <= 1)
|
||||
|
||||
Reference in New Issue
Block a user