Deactivate window when clicking outside

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

Irayo
Just popping in
Just popping in
Posts: 1
Joined: Sat Dec 29, 2012 05:56

Deactivate window when clicking outside

Postby Irayo » Sat Dec 29, 2012 06:08

Hi,

I'm brand new to CEGUI and I've gotten stuck on something that's probably simple but I can't figure out a quick way to do it.

I'm working on a game. I have some framewindows with buttons and editboxes (which I'm using for several things e.g. chat windows, console, etc.). These framewindows pop up in front of the game itself to allow user interaction.

When the user selects an editbox inside the framewindow, the keyboard input is directed to that editbox. That's great and it works perfectly. But I'd like to make it so that when the mouse is clicked back on the DefaultWindow (where the actual game is), all UI elements lose focus so that keyboard commands are sent to the game instead of whatever editbox or other widget had focus before.

I've seen a couple of related posts around the forums about how to do similar things, but I'm not familiar with some of the techniques suggested (e.g. iterating through windows, etc.) and the posts were generally very old. Is there a simpler way to do this now?

Also as a side note, CEGUI is one of the best documented and most flexible support libraries I've had the pleasure of using. I rarely have the pleasure of going from a library source tarball all the way to working great in my project in so short a time. Thanks for the awesome system!

Return to “Help”

Who is online

Users browsing this forum: No registered users and 23 guests