Robert,
On 12/4/2012 12:21 PM, Robert Osfield wrote:
Hi Judson.
On 4 December 2012 14:56, Judson Weissert <[email protected]
<mailto:[email protected]>> wrote:
I meant for cases where the event handler performs multiple tasks.
i.e., provide the ability to disable continuous capture, but keep
the single frame capture feature working for the
ScreenCaptureHandler. Restated, I want to keep 's' behavior, but
disable 'S'.
Have you tried simply doing:
captureeventhhandler->setKeyEventToggleContinuousCapture(0);
This should result in a the event never being matched.
Robert.
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 your help,
Judson
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org