Active mouse with CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

p_designc
Just popping in
Just popping in
Posts: 4
Joined: Tue Nov 07, 2006 10:45

Active mouse with CEGUI

Postby p_designc » Tue Nov 07, 2006 13:55

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!

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Nov 07, 2006 14:31

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.

Sjizo
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Thu Aug 31, 2006 08:44

Postby Sjizo » Wed Nov 08, 2006 09:00

yeah the function you're looking for is ShowCursor(false);


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests