Page 1 of 1

Active mouse with CEGUI

Posted: Tue Nov 07, 2006 13:55
by p_designc
I am working on CEGUI with OGRE and OIS....And I have made the window mouse non-excusive with the window. But there are two mouses appear when i inject the following code.

Code: Select all


void Game::mouseMoved( const OIS::MouseEvent &e )
{
   CEGUI::System::getSingleton().injectMouseMove(e.state.relX, e.state.relY);

}




I want the CEGUI mouse arrow appears when my mouse is enter into the window, and I want the cursor back to normal when it outside the window.

Any suggestions? thanks!

Posted: Tue Nov 07, 2006 14:31
by Rackle
You need to manage the Windows mouse via the ShowCursor function (I think that's the name). In the old days you'd intercept the WM_HITTEST (or something like that) and when it is over the client area you hide the Windows cursor otherwise you display it.

Posted: Wed Nov 08, 2006 09:00
by Sjizo
yeah the function you're looking for is ShowCursor(false);