Fixed: Mouse wheel should scroll target object instead scroll bar (fixes issue #327)

--HG--
branch : develop
hg/compatibility-develop
Nimetu 7 years ago
parent 98ae75fe57
commit e625f2b3c7

@ -885,7 +885,7 @@ namespace NLGUI
} }
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical) if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical)
{ {
moveTrackY (eventDesc.getWheel() * 12); moveTargetY (-(eventDesc.getWheel() * 12));
return true; return true;
} }
} }

@ -1305,7 +1305,7 @@ namespace NLGUI
CInterfaceGroup *currParent = _Parent; CInterfaceGroup *currParent = _Parent;
while (currParent) while (currParent)
{ {
if (currParent->moveSBTrackY (this, eventDesc.getWheel()*12)) if (currParent->moveSBTargetY (this, -(eventDesc.getWheel()*12)))
return true; return true;
currParent = currParent->getParent(); currParent = currParent->getParent();
} }

Loading…
Cancel
Save