I WANT THE PICTURE TO ADD ON Button
I WANT TO ADD THE PICTURE NAMED start.png
video::ITexture* image = driver->getTexture("media/start.png");
guienv->addButton(rect<s32>(10,250,100,250 + 32), 0, 101,L"Start The Game");
HOW CAN I ADD ?
I THANK FOR YOUR ANSWERS RIGHT NOW
Button and image
I think you should use draw2DImage. You'll just have to guess the coordinates so the image would look like it's on the button.
For example:
And i just found out that a button has a method called setImage();
Try this :
For example:
Code: Select all
driver->draw2DImage(image, core::position2d<s32>(x,y));
Try this :
Code: Select all
gui::IGUIButton *button = guienv->addButton(core::rect<s32>(10,250,100,250 + 32), 0, 101,L"Start The Game");
button->setImage(image);
http://irrlicht.sourceforge.net/docu/cl ... utton.html
> setImage...
> setImage...