Question about setMouseCursor

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

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: Question about setMouseCursor

Postby cCj » Sun Aug 07, 2011 22:29

Oh ok, thx Kulik. But why arent the stuff in 0.7.5? and can you expect these fixes to be in some 0.7.x release? Sorry i just dont know what your plans are for this :D

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Question about setMouseCursor

Postby Kulik » Sun Aug 07, 2011 23:28

Probably because it wasn't there when 0.7.5 was released :-) 0.7.6 release would be nice but I am unsure whether that will happen. Releasing is a lot of pain and the focus is on 0.8

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: Question about setMouseCursor

Postby cCj » Wed Aug 10, 2011 17:29

So I assume its going to be in 0.8.

thx

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

setDefaultMouseCursor Fix [CEGUI 0.7.x]

Postby BrightBit » Sat May 12, 2012 20:27

Hello,

I know the topic is quite old but I stumbled across the same problem and found a fix. In my code I also change the global mouse cursor when the user clicks on a certain button but as long as the mouse is still on that button the user won't see the changes. Here is what I had to add:

Code: Select all

bool Button::onClick(const CEGUI::EventArgs& args)
{
   CEGUI::System::getSingleton().setDefaultMouseCursor("CustomImageset", "NewMouseIcon");

   // THE FIX: these two lines will force the button to draw the new mouse cursor immediately
   CEGUI::Window* win = CEGUI::System::getSingleton().getWindowContainingMouse();
   win->setMouseCursor(CEGUI::System::getSingleton().getDefaultMouseCursor());
}

Now the new cursor will be drawn immediately.


Greetings
BrightBit
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests