//! Adds a context menu to the environment. IGUIContextMenu* CGUIEnvironment::addContextMenu(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id) { IGUIContextMenu* c = new CGUIContextMenu(this, parent ? parent : this, id, rectangle); c->drop(); return c; }
//! Adds a menu to the environment. IGUIContextMenu* CGUIEnvironment::addMenu(IGUIElement* parent, s32 id) { if (!parent) parent = this; IGUIContextMenu* c = new CGUIMenu(this, parent, id, core::rect<s32>(0,0, parent->getAbsolutePosition().getWidth(), parent->getAbsolutePosition().getHeight())); c->drop(); return c; }