Fixed remaining issues with text bubbles by moving them to top of the hierarchy when focused
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5889 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -106,21 +106,26 @@ void BubbleWidget::updateSize()
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/*
|
||||
|
||||
EventPropagation BubbleWidget::focused(const int playerID)
|
||||
{
|
||||
if (m_element != NULL)
|
||||
{
|
||||
IGUIStaticText* widget = getIrrlichtElement<IGUIStaticText>();
|
||||
//widget->setDrawBorder(true);
|
||||
widget->setRelativePosition(m_expanded_size);
|
||||
widget->setText(getText().c_str());
|
||||
// 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;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
void BubbleWidget::unfocused(const int playerID)
|
||||
{
|
||||
if (m_element != NULL)
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace GUIEngine
|
||||
|
||||
virtual void add();
|
||||
|
||||
virtual EventPropagation focused(const int playerID);
|
||||
|
||||
void updateSize();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user