[solved] EventInputCaptureLost question...

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

mrzli777
Just popping in
Just popping in
Posts: 19
Joined: Fri Jan 04, 2008 11:22

[solved] EventInputCaptureLost question...

Postby mrzli777 » Mon May 26, 2008 16:37

Hello!

I need an event to be executed after a window loses input capture, so I'm using EventInputCaptureLost.

However it doesn't seem to work the way (I think) it should.

When there is no EventInputCapureGained registered (only EventInputCaptureLost is registered), EventInputCaptureLost is fired each time I click on a window, and never when I click on another window after the focus was on the window in question (and that is what it should do, right?).

When there is also EventInputCaptureGained registered, these two event are fired alternately when I click on the window (also EventInputCaptureLost is fired as it should be when I click on another window, but only in this specific situation - EventInputCaptureGained is registered and fired before this).
So in this situation, I click on the window, EventInputCaptureGained is fired. I again click on the window, and EventInputCaptureLost is fired, but the input focus is still on the same window, and this is wrong, right?

In the one remaining situation, where only EventInputCaptureGained is registered, it is fired on click 1, 3, 5, 7..., but should be fired only the first time, since input capure is never lost if I click only on that window.

Is this a bug, or did I get something wrong?

Thx
Last edited by mrzli777 on Tue May 27, 2008 11: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 » Tue May 27, 2008 08:44

Hi,

I think you have those particular events confused with something else.

The 'capture' of inputs occurs when the user is in mid-interaction with certain widgets to ensure that all inputs continue to come to the widget that the user is interacting with. For example, the push button will capture inputs when the use presses the mouse button down, so that if the user then moves the mouse cursor out of the button window (while still holding the button down) events still come to the button so that it can determine which state it should be in, and also so that it knows when the user releases the mouse button. When the user does release the mouse button (or certain other events occur), the widget will release the capture (or lose it in a way enforced by the system).

I think perhaps you want EventActivated and EventDeactivated instead :)

CE.

mrzli777
Just popping in
Just popping in
Posts: 19
Joined: Fri Jan 04, 2008 11:22

Postby mrzli777 » Tue May 27, 2008 11:11

You're right. My bad :?

What can I say - thanks CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 37 guests