List Boxes

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
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

List Boxes

Post by Tyn »

Hey

So, I've created a listbox. When I add items to the API says it returns the ID of the new item. Since I have a pointer for this listbox, this would return the ID to the pointer right? But then when I add a new item to the listbox the pointer will be the new ID. I can't create a pointer for each new item as the pointer tells the engine which listbox I am dealing with, so how would I go about this?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

your initial understanding is wrong. read the header again:
http://irrlicht.sourceforge.net/docu/cl ... t.html#a19

the function returns a pointer to the object. The ID is set inside of the function parameters. currently there is now way that I can see to get an IGUIElement from the GUI Environment by its ID, so make sure you grab onto this pointer if you want to directly access the element in the future.
a screen cap is worth 0x100000 DWORDS
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

That ID is the ID for the Listbox rather than each seperate item isn't it? Sorry if I'm missing something, I can be a little slow to pick up on a point. Has anyone actually got a project where they have used ID's to pick list box items so I can look at the code? I usually learn better by code than by explination.
Post Reply