mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Changed the signature of MouseListener::mouseWheelMove() to take a struct MouseWheelDetails rather than raw floats. This will require updates in source code that uses mouse-wheel callbacks, but provides some new abilities, including a flag to indicate inverted wheel direction.
This commit is contained in:
parent
cb169b251d
commit
87175c91f5
32 changed files with 265 additions and 210 deletions
|
|
@ -380,11 +380,9 @@ void ScrollBar::mouseUp (const MouseEvent&)
|
|||
repaint();
|
||||
}
|
||||
|
||||
void ScrollBar::mouseWheelMove (const MouseEvent&,
|
||||
float wheelIncrementX,
|
||||
float wheelIncrementY)
|
||||
void ScrollBar::mouseWheelMove (const MouseEvent&, const MouseWheelDetails& wheel)
|
||||
{
|
||||
float increment = 10.0f * (vertical ? wheelIncrementY : wheelIncrementX);
|
||||
float increment = 10.0f * (vertical ? wheel.deltaY : wheel.deltaX);
|
||||
|
||||
if (increment < 0)
|
||||
increment = jmin (increment, -1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue