1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

BeefPerf scroll wheel fixes

This commit is contained in:
Brian Fiete 2020-10-15 10:51:31 -07:00
parent 72411118c2
commit 1013383202

View file

@ -2025,18 +2025,18 @@ namespace BeefPerf
gApp.SetCursor(wantCursor);
}
public override void MouseWheel(float x, float y, float delta)
public override void MouseWheel(float x, float y, float deltaX, float deltaY)
{
base.MouseWheel(x, y, delta);
base.MouseWheel(x, y, deltaX, deltaY);
double ticksPerPixel = 1.0 / mTickScale;
double mouseTick = (x * ticksPerPixel) + mTickOffset;
float scaleFactor = (mWidgetWindow.IsKeyDown(.Control)) ? 1.02f : 1.2f;
if (delta > 0)
if (deltaY > 0)
mTickScale *= scaleFactor;
else if (delta < 0)
else if (deltaY < 0)
mTickScale /= scaleFactor;
ClampView(); // Clamp scale first