How can i get the focus window type??
Moderators: CEGUI MVP, CEGUI Team
How can i get the focus window type??
When a window is activated ,I want to get the focus window's type so i can do some special operation in various windowtype. But i can't find a good function or API to get the window's type . Do anybody have some good ideas?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: How can i get the focus window type??
When I was working on menus etc. I needed this functionality too...
So if you're on CVS HEAD, use the CEGUI::Window::testClassName function.
It takes a string as its only parameter fx: "StaticText", and returns true if the window tested is - or was inherited from - the CEGUI::StaticText element.
If you're not on CVS HEAD, you'll have to come up with something else. Perhaps dedicate the userid/data to that information.
HTH
edit: I guess if you're satisfied with look dependent values, you could use the windowtype ex. "WindowsLook/Button"
So if you're on CVS HEAD, use the CEGUI::Window::testClassName function.
It takes a string as its only parameter fx: "StaticText", and returns true if the window tested is - or was inherited from - the CEGUI::StaticText element.
If you're not on CVS HEAD, you'll have to come up with something else. Perhaps dedicate the userid/data to that information.
HTH
edit: I guess if you're satisfied with look dependent values, you could use the windowtype ex. "WindowsLook/Button"
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 5 guests