1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02: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
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;