From Rafa Giatan and Robert Osfield, added support for User defined events, by adding
UserData to Events.
This commit is contained in:
@@ -358,3 +358,15 @@ GUIEventAdapter* EventQueue::createEvent()
|
||||
if (_accumulateEventState.valid()) return new GUIEventAdapter(*_accumulateEventState.get());
|
||||
else return new GUIEventAdapter();
|
||||
}
|
||||
|
||||
void EventQueue::userEvent(osg::Referenced* userEventData, double time)
|
||||
{
|
||||
GUIEventAdapter* event = new GUIEventAdapter(*_accumulateEventState);
|
||||
event->setEventType(GUIEventAdapter::USER);
|
||||
event->setUserData(userEventData);
|
||||
event->setTime(time);
|
||||
|
||||
addEvent(event);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user