Forbig changing language when in-game as this crashes
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9984 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -1477,7 +1477,8 @@ void Skin::drawCheckBox(const core::recti &rect, Widget* widget, bool focused)
|
||||
void Skin::drawList(const core::recti &rect, Widget* widget, bool focused)
|
||||
{
|
||||
drawBoxFromStretchableTexture(widget, rect,
|
||||
SkinConfig::m_render_params["list::neutral"]);
|
||||
SkinConfig::m_render_params["list::neutral"],
|
||||
widget->m_deactivated, NULL);
|
||||
|
||||
} // drawList
|
||||
|
||||
@@ -1491,10 +1492,10 @@ void Skin::drawListSelection(const core::recti &rect, Widget* widget,
|
||||
{
|
||||
ListWidget* list = dynamic_cast<ListWidget*>(widget);
|
||||
assert(list != NULL);
|
||||
|
||||
|
||||
drawBoxFromStretchableTexture(&list->m_selection_skin_info, rect,
|
||||
SkinConfig::m_render_params["listitem::focused"],
|
||||
false, clip);
|
||||
SkinConfig::m_render_params["listitem::focused"],
|
||||
list->m_deactivated, clip);
|
||||
} // drawListSelection
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -174,6 +174,17 @@ void OptionsScreenUI::init()
|
||||
|
||||
list_widget->setSelectionID( list_widget->getItemID(UserConfigParams::m_language) );
|
||||
|
||||
// Forbid changing language while in-game, since this crashes (changing the language involves
|
||||
// tearing down and rebuilding the menu stack. not good when in-game)
|
||||
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
|
||||
{
|
||||
list_widget->setDeactivated();
|
||||
}
|
||||
else
|
||||
{
|
||||
list_widget->setActivated();
|
||||
}
|
||||
|
||||
} // init
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user