1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Smooth scrolling (#14562)

This commit is contained in:
grorp 2024-04-28 00:14:31 +02:00 committed by GitHub
parent 05d5dc4cec
commit 73dbd2f0ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 105 additions and 44 deletions

View file

@ -774,9 +774,9 @@ bool GUIEditBox::processMouse(const SEvent &event)
}
case EMIE_MOUSE_WHEEL:
if (m_vscrollbar && m_vscrollbar->isVisible()) {
s32 pos = m_vscrollbar->getPos();
s32 pos = m_vscrollbar->getTargetPos();
s32 step = m_vscrollbar->getSmallStep();
m_vscrollbar->setPos(pos - event.MouseInput.Wheel * step);
m_vscrollbar->setPosInterpolated(pos - event.MouseInput.Wheel * step);
return true;
}
break;