How can i get the focus window type??
Posted: Wed Jun 08, 2005 07:07
by jasom_liu
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?
Re: How can i get the focus window type??
Posted: Wed Jun 08, 2005 17:02
by lindquist
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"