1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +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

@ -869,7 +869,7 @@ bool GUITable::OnEvent(const SEvent &event)
core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y);
if (event.MouseInput.Event == EMIE_MOUSE_WHEEL) {
m_scrollbar->setPos(m_scrollbar->getPos() +
m_scrollbar->setPosInterpolated(m_scrollbar->getTargetPos() +
(event.MouseInput.Wheel < 0 ? -3 : 3) *
- (s32) m_rowheight / 2);
return true;