More gui stuff(SOLVED)

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
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

More gui stuff(SOLVED)

Post by 3DModelerMan »

Hi I have everything in my menu, setup (Thanks to everyone who answered my other posts) and I need to know how to name a button for reference after I have created it via

Code: Select all

guienv->addButton(rect<s32>(25,210,160,240), 0, 101, L"Play.");
or how to name an image that has been created like this

Code: Select all

guienv->addImage(driver->getTexture("C:/Documents and Settings/Tanner/My Documents/pingy3/gui/bkg.bmp "),
    position2d<int>(0,0));
I want to be able to use its name for functions and need to know how to name them.

Thanks for any help :lol:
Last edited by 3DModelerMan on Tue Jun 03, 2008 5:33 pm, edited 1 time in total.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
pelonzudo
Posts: 20
Joined: Wed May 07, 2008 11:14 am

Post by pelonzudo »

Just create a pointer to your needed IGUI element

Code: Select all

IGUIButton* b = guienv->addButton(rect<s32>(25,210,160,240), 0, 101, L"Play.");
or after add it

Code: Select all

IGUIButton* b = (IGUIButton*) guienv->getRootGUIElement()->getElementFromId(s32 id, bool searchchildren );
Post Reply