Fix radar cursor fake mouse event location.
This commit is contained in:
@@ -82,16 +82,17 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
if (world == null || !hasRadar)
|
if (world == null || !hasRadar)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var loc = MinimapPixelToCell(pos);
|
var cell = MinimapPixelToCell(pos);
|
||||||
|
var location = Game.viewport.WorldToViewPx(worldRenderer.ScreenPxPosition(cell.CenterPosition));
|
||||||
|
|
||||||
var mi = new MouseInput
|
var mi = new MouseInput
|
||||||
{
|
{
|
||||||
Location = loc.ToInt2(),
|
Location = location,
|
||||||
Button = MouseButton.Right,
|
Button = MouseButton.Right,
|
||||||
Modifiers = Game.GetModifierKeys()
|
Modifiers = Game.GetModifierKeys()
|
||||||
};
|
};
|
||||||
|
|
||||||
var cursor = world.OrderGenerator.GetCursor(world, loc, mi);
|
var cursor = world.OrderGenerator.GetCursor(world, cell, mi);
|
||||||
if (cursor == null)
|
if (cursor == null)
|
||||||
return "default";
|
return "default";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user