Flip the default meaning of alternate-mouse-wheel-dir

This commit is contained in:
James Turner
2019-04-11 20:37:47 +01:00
parent 5f9b17d55b
commit 57339486d9

View File

@@ -582,20 +582,18 @@ public:
}
}
}
virtual bool buttonPressed( int button,
const osgGA::GUIEventAdapter& ea,
const Info& )
{
bool buttonPressed( int button, const osgGA::GUIEventAdapter& ea, const Info& ) override
{
if (!_condition || _condition->test()) {
// the 'be nice to Mac / laptop' users option; alt-clicking spins the
// opposite direction. Should make this configurable
// opposite direction. Should make this configurable
if ((button == 0) && (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_ALT)) {
button = 1;
}
int increaseMouseWheel = static_knobMouseWheelAlternateDirection ? 3 : 4;
int decreaseMouseWheel = static_knobMouseWheelAlternateDirection ? 4 : 3;
const int increaseMouseWheel = static_knobMouseWheelAlternateDirection ? 4 : 3;
const int decreaseMouseWheel = static_knobMouseWheelAlternateDirection ? 3 : 4;
_direction = DIRECTION_NONE;
if ((button == 0) || (button == increaseMouseWheel)) {