Fix #4096
This commit is contained in:
parent
1a7a8bdc14
commit
34b2e074bb
@ -309,6 +309,7 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
||||
assert( skinSelector != NULL );
|
||||
|
||||
const core::stringw selectedSkin = skinSelector->getStringValue();
|
||||
bool right = skinSelector->isRightButtonSelected();
|
||||
UserConfigParams::m_skin_file = m_skins[selectedSkin];
|
||||
irr_driver->unsetMaxTextureSize();
|
||||
bool prev_icon_theme = GUIEngine::getSkin()->hasIconTheme();
|
||||
@ -342,6 +343,11 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
||||
};
|
||||
GUIEngine::switchToScreen(MainMenuScreen::getInstance());
|
||||
StateManager::get()->resetAndSetStack(screen_list);
|
||||
// Need to use new widget pointer
|
||||
skinSelector =
|
||||
OptionsScreenUI::getInstance()->getWidget<GUIEngine::SpinnerWidget>("skinchoice");
|
||||
skinSelector->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
skinSelector->setSelectedButton(right);
|
||||
}
|
||||
irr_driver->setMaxTextureSize();
|
||||
}
|
||||
@ -355,6 +361,7 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
||||
{
|
||||
GUIEngine::SpinnerWidget* font_size = getWidget<GUIEngine::SpinnerWidget>("font_size");
|
||||
assert( font_size != NULL );
|
||||
bool right = font_size->isRightButtonSelected();
|
||||
UserConfigParams::m_font_size = font_size->getValue();
|
||||
GUIEngine::clear();
|
||||
GUIEngine::cleanUp();
|
||||
@ -372,6 +379,11 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
||||
};
|
||||
GUIEngine::switchToScreen(MainMenuScreen::getInstance());
|
||||
StateManager::get()->resetAndSetStack(screen_list);
|
||||
// Need to use new widget pointer
|
||||
font_size =
|
||||
OptionsScreenUI::getInstance()->getWidget<GUIEngine::SpinnerWidget>("font_size");
|
||||
font_size->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
font_size->setSelectedButton(right);
|
||||
}
|
||||
else if (name == "split_screen_horizontally")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user