Retrieving individual GUI elements

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
julescoder
Posts: 34
Joined: Thu Feb 18, 2010 5:24 pm

Retrieving individual GUI elements

Post by julescoder »

Hi,
I have created a user interface using the GUI editor and outputted an xml file with the ui settings.


After i load it into the GUIEnvironment using LoadGUI(), how can i access the individual GUI elements ?


Would i have to create the element that i want to access manually (using the addGUIElement) and save the return value into a pointer or is there another way. I have checked the documentation but not found a way.

Thanx !
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

you'll have to give each element an unique ID, then you can find it by using getElementFromId(...)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
julescoder
Posts: 34
Joined: Thu Feb 18, 2010 5:24 pm

Post by julescoder »

Thank u very much.

That getElementFromID() is called from the root element. Which u have brought to my attention.

Thank you again.
Post Reply