Some fixes to my GUI Engine additions, so that they are compatible with the rest of the game.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13377 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -187,7 +187,8 @@ void ModalDialog::dismiss()
|
||||
{
|
||||
if(modalWindow != NULL) delete modalWindow;
|
||||
modalWindow = NULL;
|
||||
GUIEngine::getCurrentScreen()->onDialogClose();
|
||||
if(GUIEngine::getCurrentScreen() != NULL)
|
||||
GUIEngine::getCurrentScreen()->onDialogClose();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -128,12 +128,11 @@ void LabelWidget::add()
|
||||
|
||||
void LabelWidget::setText(const wchar_t *text, bool expandIfNeeded)
|
||||
{
|
||||
assert(m_element != NULL);
|
||||
m_scroll_offset = 0;
|
||||
|
||||
if (expandIfNeeded)
|
||||
{
|
||||
|
||||
assert(m_element != NULL);
|
||||
const int fwidth = (m_title_font ? GUIEngine::getTitleFont() : GUIEngine::getFont())->getDimension(text).Width;
|
||||
core::rect<s32> rect = m_element->getRelativePosition();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user