Some attempts at proper anchor movement..

This commit is contained in:
SpoinkyNL committed 2020-01-20 08:53:17 +01:00
1 parent 99c1638907
commit b2507202bd
6 files changed
+269 -153

No files matched your search

@@ -44,8 +44,16 @@ namespace Artemis.UI.Screens.Shared
Zoom = Math.Max(0.1, Math.Min(4, Zoom));
// Update the PanX/Y to enable zooming relative to cursor
PanX = Math.Min(0, absoluteX - relative.X * Zoom);
PanY = Math.Min(0, absoluteY - relative.Y * Zoom);
if (LimitToZero)
{
PanX = Math.Min(0, absoluteX - relative.X * Zoom);
PanY = Math.Min(0, absoluteY - relative.Y * Zoom);
}
else
{
PanX = absoluteX - relative.X * Zoom;
PanY = absoluteY - relative.Y * Zoom;
}
}
public void ProcessMouseMove(object sender, MouseEventArgs e)