From: ThorstenB Date: Fri, 12 Aug 2011 21:28:57 +0000 (+0200) Subject: Tatsuhiro Nishioka: #403, scroll up/down for Mac OS X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=20914e49cd775065cbcff4df0ab6ed2ea3858a0a;p=flightgear.git Tatsuhiro Nishioka: #403, scroll up/down for Mac OS Support osgViewer's Scroll_2D event (so far only available for Mac) --- diff --git a/src/Main/FGEventHandler.cxx b/src/Main/FGEventHandler.cxx index 5599723fa..91d830e6d 100644 --- a/src/Main/FGEventHandler.cxx +++ b/src/Main/FGEventHandler.cxx @@ -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;