Add smooth minimap to world movement
This commit is contained in:
@@ -250,7 +250,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
public CPos ViewToWorld(int2 view)
|
||||
{
|
||||
var world = worldRenderer.Viewport.ViewToWorldPx(view);
|
||||
var world = ViewToWorldPx(view);
|
||||
var map = worldRenderer.World.Map;
|
||||
var candidates = CandidateMouseoverCells(world).ToList();
|
||||
|
||||
@@ -337,6 +337,13 @@ namespace OpenRA.Graphics
|
||||
allCellsDirty = true;
|
||||
}
|
||||
|
||||
public void Center(float2 pos)
|
||||
{
|
||||
CenterLocation = worldRenderer.ScreenPosition(pos).Clamp(mapBounds);
|
||||
cellsDirty = true;
|
||||
allCellsDirty = true;
|
||||
}
|
||||
|
||||
public void Scroll(float2 delta, bool ignoreBorders)
|
||||
{
|
||||
// Convert scroll delta from world-px to viewport-px
|
||||
|
||||
Reference in New Issue
Block a user