Hi Judson,
On 4 December 2012 18:07, Judson Weissert <jud...@mfrac.com> wrote: > The following problems occurred when I tried that: > > 1. It exposed the missing break statement issue that you have subsequently > fixed. > 2. The getUsage() function still reports 'S' as a viable command, and I > currently use the HelpHandler for displaying viewer usage tips. > > My solution was to derive from ScreenCaptureCaptureHandler and override > getUsage() in addition to calling setKeyEventToggleContinuousCapture() as > you suggested above. Deriving and overriding is a good solution in a lot of > cases, but then I have to be careful not to fall into a trap of copying OSG > library code into my code base (since I want similar behavior). > Thanks for the explanation, all makes sense. I've done a review of the getUsage() implementations in src/osgViewer and they are inconsistent with several suspect casts and no guards to switch off the help when the associated keycode is 0. To address this I've create a couple of extra methods in the ApplicationUsage class to make it more convinient to pass in keycodes and automatically handle the case where a keycode is zero - just ignoring these entries so they won't appear in the on screen stats. And svn update will get these changes. Robert.
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org