event->state = ea.getButtonMask();
event->mod = ea.getModKeyMask();
- static simgear::Rect<float> resize_region;
-
if( !_resize_window.expired() )
{
switch( ea.getEventType() )
if( window_at_cursor )
{
- const simgear::Rect<float>& reg = window_at_cursor->getRegion();
+ const SGRect<float>& reg = window_at_cursor->getRegion();
if( window_at_cursor->isResizable()
&& ( ea.getEventType() == osgGA::GUIEventAdapter::MOVE
// duplicate events, so lets ignore the second event with the same
// timestamp.
if( _last_scroll_time == ea.getTime() )
- return true;
+ return window_at_cursor ? true : false;
_last_scroll_time = ea.getTime();
event->type = sc::Event::WHEEL;
}
//----------------------------------------------------------------------------
- const simgear::Rect<float>& Window::getRegion() const
+ const SGRect<float>& Window::getRegion() const
{
return _image.getRegion();
}
virtual void valueChanged(SGPropertyNode* node);
osg::Group* getGroup();
- const simgear::Rect<float>& getRegion() const;
+ const SGRect<float>& getRegion() const;
void setCanvas(simgear::canvas::CanvasPtr canvas);
simgear::canvas::CanvasWeakPtr getCanvas() const;