Page 1 of 1

mouse cursor disappearing [SOLVED]

Posted: Tue Mar 25, 2008 13:33
by duindain
Hey im working on a ogre / cegui application

when i load it up everythings fine the mouse cursor is in the center of the screen
as soon as i move the mouse it disappears and never comes back

if i move the mouse over a editbox or text area it reappears and becomes a proper cursor for text input but once i move the mouse anywhere else it disappears again even though the cursor is not visible it is still there i can see the mouseover code being activated on buttons and other windows but unless its a text one the cursor is invisible

Code: Select all

bool mouseMoved(const OIS::MouseEvent &arg)
    {
      // Update CEGUI with the mouse motion
      float sensativity = 2;
      CEGUI::System::getSingleton().injectMouseMove(arg.state.X.rel*sensativity, arg.state.Y.rel*sensativity);
      CEGUI::System::getSingleton().injectMouseWheelChange(arg.state.Z.abs);
   
   

this is my mousemove code i dont think the problem is there. there must be something ive forgotton to do which is prompting the cursor to disappear
does anyone have any suggestions what to look for and what functions could cause it because ive checked everything i can think of so far and no luck
thankyou

Posted: Wed Mar 26, 2008 09:05
by CrazyEddie
Hi,

you need to set a default mouse cursor - this will then be used for instances where a cursor is not explicitly specified by a window.

Code: Select all

...
try
{
    CEGUI::System::getSingleton().setDefaultMouseCursor( "TaharezLook", "MouseArrow" );
}
catch (CEGUI::Exception& e)
{
    // something went wrong - probably did not load the imageset first!
    //TODO: Handle error,
}
...


HTH

CE

Posted: Wed Mar 26, 2008 13:09
by duindain
Thankyou that fixed it