[Solved]mouse cursor in window

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

K0h4n
Just popping in
Just popping in
Posts: 14
Joined: Sun Apr 06, 2008 15:21

[Solved]mouse cursor in window

Postby K0h4n » Thu Jul 17, 2008 09:40

i create a window 1/4 of the root width and height
and i put it at the bottom left side

is there any input reader so when the mouse is on top of the window, the alpha of the window is 1 and set the window active
when the mouse is outside the window the alpha will be 0.5 and deactive the window

i'm using default window
changing alpha is easy but i still cannot figure how to check whether the mouse cursor is inside the window or outside the window

any help is appreciated
Last edited by K0h4n on Thu Jul 17, 2008 15:13, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Jul 17, 2008 11:10

You could subscribe the Window::EventMouseEnters / Window::EventMouseLeaves for the Window and respond to those.

Alternatively, you could check the System::getWindowContainingMouse return result periodically, be aware there is a minor known issue with this member function: http://www.cegui.org.uk/mantis/view.php?id=213

HTH

CE.

K0h4n
Just popping in
Just popping in
Posts: 14
Joined: Sun Apr 06, 2008 15:21

Postby K0h4n » Thu Jul 17, 2008 15:11

wow it works
thank you Eddie


Return to “Help”

Who is online

Users browsing this forum: No registered users and 11 guests