Пример #1
0
/* ----------------------------------------------------------------------------
remove a GUI object from the display
*/
void DLL_EXPORT IrrGUIRemove( IGUIElement *element )
{
	if ( element )
	{
		IGUIElement * parent = element->getParent();
		if ( parent ) parent->removeChild( element );
	}
}
Пример #2
0
EventPropagation BubbleWidget::focused(const int playerID)
{
    if (m_element != NULL)
    {
        // bring element to top (with a hack because irrlicht does not appear to offer a built-in way to do this)
        m_element->grab();

        IGUIElement* parent = m_parent;
        if (parent == NULL) parent = GUIEngine::getGUIEnv()->getRootGUIElement();

        parent->removeChild(m_element);
        parent->addChild(m_element);
        m_element->drop();
    }
    return EVENT_LET;
}