Re: [osg-users] Hide mouse pointer and set mouse pointer position
Hi Paul, A couple of pointers You can use GraphicsWindow::useCursor(boo) to toggle on/off the cursor. You can use GraphicsWindow::requestWarpPointer(x,y) to position the mouse. Robert. On Thu, May 14, 2009 at 1:01 AM, Paul gaffe...@gmail.com wrote: Hi, Im creating a music application using osg, i wish to hide and show the mouse pointer and set its position so when I click on a knob or volume level fader the pointer disapears during the drag and reaperars in the same position as before the drag. Any ideas? Im saving the mouse position before the drag with: Code: case(osgGA::GUIEventAdapter::PUSH): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { mouseDown = true; mouseResetX = ea.getX(); mouseResetY = ea.getY(); // somehow hide the mouse pointer here!! } return false; } I need a way to hide the mouse in the above code and show the mouse and set its position in the code below. Code: case(osgGA::GUIEventAdapter::RELEASE): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { // somehow show the mouse pointer and set its position here!! } return false; } ... Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12050#12050 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Hide mouse pointer and set mouse pointer position
Hi, Im creating a music application using osg, i wish to hide and show the mouse pointer and set its position so when I click on a knob or volume level fader the pointer disapears during the drag and reaperars in the same position as before the drag. Any ideas? Im saving the mouse position before the drag with: Code: case(osgGA::GUIEventAdapter::PUSH): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { mouseDown = true; mouseResetX = ea.getX(); mouseResetY = ea.getY(); // somehow hide the mouse pointer here!! } return false; } I need a way to hide the mouse in the above code and show the mouse and set its position in the code below. Code: case(osgGA::GUIEventAdapter::RELEASE): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { // somehow show the mouse pointer and set its position here!! } return false; } ... Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12050#12050 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Hide mouse pointer and set mouse pointer position
Paul wrote: Hi, Im creating a music application using osg, i wish to hide and show the mouse pointer and set its position so when I click on a knob or volume level fader the pointer disapears during the drag and reaperars in the same position as before the drag. Any ideas? You don't say what OS you're on. You can show/hide the cursor with osgViewer's GraphicsWindow::setCursor() and request it be repositioned with GraphicsWindow::requestWarpPointer(). -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Hide mouse pointer and set mouse pointer position
Hi, Im creating a music application using osg, i wish to hide and show the mouse pointer and set its position so when I click on a knob or volume level fader the pointer disapears during the drag and reaperars in the same position as before the drag. Any ideas? Im saving the mouse position before the drag with: Code: case(osgGA::GUIEventAdapter::PUSH): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { mouseDown = true; mouseResetX = ea.getX(); mouseResetY = ea.getY(); // somehow hide the mouse pointer here!! } return false; } I need a way to hide the mouse in the above code and show the mouse and set its position in the code below. Code: case(osgGA::GUIEventAdapter::RELEASE): { osgViewer::View* view = dynamic_castosgViewer::View*(aa); if (view) { // somehow show the mouse pointer and set its position here!! } return false; } ... Heres a screenshot of the chrome look 3D GUI system ive created so far using osg. Dragging the mouse around, the reflections look quite impressive. [Image: http://img401.imageshack.us/img401/8212/pichbu.jpg ] Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12050#12050 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Hide mouse pointer and set mouse pointer position
Im on windows but hope to do linux and mac too one day. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12053#12053 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org