Destroying a StaticImagePtr

Spr

02-12-2009 14:08:18

Hello Everybody,

I would appreciate if anyone could tell me how exactly can I destroy a StaticImagePtr?

Sincerely,
SPR

Altren

02-12-2009 15:23:37

http://www.ogre3d.org/wiki/index.php/My ... et_control
last section there. Usually something likemGui->destroyWidget(staticImage);

Spr

02-12-2009 15:29:42

Hey Altren, Thanks for the quick response.

This is the section that you have referred (in bold):
To destroy widget you need to have widget pointer (widget_ptr). Then write

MyGUI::Gui::getInstance().destroyWidget(widget_ptr);

If you don't have pointer you should get it by finding your widget by name.

MyGUI::WidgetPtr widget = MyGUI::Gui::getInstance().findWidgetT("widget_name");
MyGUI::Gui::getInstance().destroyWidget(widget);



In this case the widgetptr is destroyed, but not a StaticImagePtr. So do you think this method can be used to destroy StaticImagePtr as well?

Sincerely,
SPR

Altren

02-12-2009 16:34:25

StaticImage is widget too.