Skip to content

Commit

Permalink
Fixup 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue committed Jan 25, 2025
1 parent bb3a7d0 commit 49beecf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,13 @@ void pfGUIMultiLineEditCtrl::HandleMouseWheel(hsPoint3& mousePt, uint8_t modifie
{
static float deltaAccum = 0.f;

hsPoint3 mouseXY(mousePt.fX, mousePt.fY, 0.f);
if (IHandleMouse(mouseXY)) {
deltaAccum += mousePt.fZ;
float wheelAmount = mousePt.fZ;

// Set the Z-component to 0 for the bounds test
mousePt.fZ = 0;

if (IHandleMouse(mousePt)) {
deltaAccum += wheelAmount;
if (fabs(deltaAccum) > 120) {
int32_t delta = -1 * int32_t(deltaAccum / 120.f);
SetScrollPosition(int32_t(fScrollPos + delta));
Expand Down

0 comments on commit 49beecf

Please sign in to comment.