Code: Select all
//! adds an image. The returned pointer must not be dropped.
IGUIImage* CGUIEnvironment::addImage(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text)
{
IGUIImage* img = new CGUIImage(this, parent ? parent : this,
id, rectangle);
if (text)
img->setText(text);
img->drop();
return img;
}
Code: Select all
//! adds an image. The returned pointer must not be dropped.
IGUIImage* CGUIEnvironment::addImage(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const video::ITexture* image)
{
IGUIImage* img = new CGUIImage(this, parent ? parent : this,
id, rectangle);
if (image)
img->setImage(image);
img->drop();
return img;
}