is there a way to get the number of gui elememnts existing on my screen,
and their x and y coordinates?
thnx
gui elements
gui elements
opensource = freedom
<br>
how can you face the problem if the problem is your face?
<br>
how can you face the problem if the problem is your face?
IGUIEnvironment::getRootGUIElement () returns the top gui-element. From there on you can recursively check getChildren () to access all elements.
For an example of such a recursive function check getElementFromPoint in IGUIElement.h
For an example of such a recursive function check getElementFromPoint in IGUIElement.h
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code: Select all
irr::gui::IGUIElement *elem;
elem = dev->getGUIEnvironment()->getRootGUIElement();
irr::gui::SGUIElementList list;
list = elem->getChildren();
printf("\n\nnumber: %d \n\n", list.size);so how can i get the number of elements on my current page?
opensource = freedom
<br>
how can you face the problem if the problem is your face?
<br>
how can you face the problem if the problem is your face?
Do check the getElementFromPoint function... it does a IsVisible check as well as calling itself recursive (you have to check the children of the children and the children of those... etc).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm