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:
parent
28496bb6ac
commit
20914e49cd
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue