Fixed harmless warning and bogus resolution display in options when viewing from in-game
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8900 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2ea4582366
commit
d0e4dabf9e
@ -106,6 +106,14 @@ void OptionsScreenVideo::init()
|
||||
assert( full != NULL );
|
||||
full->setState( UserConfigParams::m_fullscreen );
|
||||
|
||||
// Enable back widgets if they were visited in-game previously
|
||||
if (StateManager::get()->getGameState() != GUIEngine::INGAME_MENU)
|
||||
{
|
||||
res->setActivated();
|
||||
full->setActivated();
|
||||
applyBtn->setActivated();
|
||||
gfx->setActivated();
|
||||
}
|
||||
|
||||
// --- get resolution list from irrlicht the first time
|
||||
if (!m_inited)
|
||||
@ -222,23 +230,7 @@ void OptionsScreenVideo::init()
|
||||
} // end if not inited
|
||||
|
||||
res->updateItemDisplay();
|
||||
|
||||
// forbid changing resolution or animation settings from in-game
|
||||
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
|
||||
{
|
||||
res->setDeactivated();
|
||||
full->setDeactivated();
|
||||
applyBtn->setDeactivated();
|
||||
gfx->setDeactivated();
|
||||
}
|
||||
else
|
||||
{
|
||||
res->setActivated();
|
||||
full->setActivated();
|
||||
applyBtn->setActivated();
|
||||
gfx->setActivated();
|
||||
}
|
||||
|
||||
|
||||
// ---- select current resolution every time
|
||||
char searching_for[32];
|
||||
snprintf(searching_for, 32, "%ix%i", (int)UserConfigParams::m_width, (int)UserConfigParams::m_height);
|
||||
@ -266,6 +258,18 @@ void OptionsScreenVideo::init()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---- forbid changing resolution or animation settings from in-game
|
||||
// (we need to disable them last because some items can't be edited when disabled)
|
||||
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
|
||||
{
|
||||
res->setDeactivated();
|
||||
full->setDeactivated();
|
||||
applyBtn->setDeactivated();
|
||||
gfx->setDeactivated();
|
||||
}
|
||||
|
||||
|
||||
updateTooltip();
|
||||
} // init
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user