My mx master (which is pretty much the most popular working mouse) has a vertical and horizontal scroll wheel. I can switch between smooth and normal mouse wheel scrolling on the vertical wheel, but juce always detects a smooth wheel, probably since the horizontal one is always smooth.
What speaks against a split into isVerticalSmooth and isHorizontalSmooth?
My usecase would be scrolling through comboboxes:
if (!isPopupActive() && e.eventComponent == this && wheelDelta != 0.0f)
{
if (wheel.isSmooth)
{
mouseWheelAccumulator += wheelDelta * 20.0f;
while (mouseWheelAccumulator > 1.0f)
{
mouseWheelAccumulator -= 1.0f;
nudgeSelectedItem (-1);
}
while (mouseWheelAccumulator < -1.0f)
{
mouseWheelAccumulator += 1.0f;
nudgeSelectedItem (1);
}
}
else
{
auto delta = wheel.isReversed ? wheelDelta : -1.f * wheelDelta;
if (delta > 0)
nudgeSelectedItem (1);
else
nudgeSelectedItem (-1);
}
}
else
{
Component::mouseWheelMove (e, wheel);
}