1
0
Fork 0

Tatsuhiro Nishioka: #403, scroll up/down for Mac OS

Support osgViewer's Scroll_2D event (so far only available for Mac)
This commit is contained in:
ThorstenB 2011-08-12 23:28:57 +02:00
parent 28496bb6ac
commit 20914e49cd

View file

@ -205,7 +205,12 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea,
return true;
#endif
int button;
if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP)
if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_2D) {
if (ea.getScrollingDeltaY() > 0)
button = 3;
else
button = 4;
} else if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP)
button = 3;
else
button = 4;