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:
parent
05d5dc4cec
commit
73dbd2f0ab
5 changed files with 105 additions and 44 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue