Changes between Version 7 and Version 8 of Support/Tutorials/BasicKeyboardInput
- Timestamp:
- 05/06/09 10:52:20 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Support/Tutorials/BasicKeyboardInput
v7 v8 51 51 To handle additional events, we would extend the first switch statement to include other events such as KEYUP, DOUBLECLICK, DRAG. To handle additional key down events we would extend the switch statement within the KEYDOWN case.[[BR]] 52 52 The return type of the event controls whether event handlers after our event handler in the event handler list get a shot at handling keyboard mouse events. If we return 'true' the event is considered handled and will not be passed on to other handlers. If we return 'false' other handlers will have the opportunity to respond to that event.[[BR]] 53 To 'install' our event handler we need to create an instance of it and add it to the osg Producer::Viewer's EventHandler list. Code as follows:53 To 'install' our event handler we need to create an instance of it and add it to the osgViewer:Viewer's EventHandler list. Code as follows: 54 54 55 55 {{{
