CEGUI function similar to Windows' GetFocus() ?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
cippyboy
Quite a regular
Quite a regular
Posts: 51
Joined: Wed Jul 30, 2008 13:23

CEGUI function similar to Windows' GetFocus() ?

Postby cippyboy » Fri Feb 13, 2009 12:20

Hi,

I've been searching for something similar to GetFocus() in windows to get the current window, in order to see if it has input focus, and if so, to not activate keyboard short-cuts while in an edit box.

I tried using CEGUI::Window::getCaptureWindow but it doesn't seem to work. I also saw there's a getKeyboardTargetWindow() in CEGUI::System but it 's private, and I can't access it, and overriding that gives me a link error for the precompiled libs.

We're also using CEGUI 0.6.2 now, so I think we're up to date.

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

Postby CrazyEddie » Fri Feb 13, 2009 14:33

Hi,

Starting from the GUI root (or some other window), call the Window::getActiveChild function.

If it's just a single, specific editbox, then calling it's local "isActive" function will have the same effect.

HTH

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests