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 );
|
assert( skinSelector != NULL );
|
||||||
|
|
||||||
const core::stringw selectedSkin = skinSelector->getStringValue();
|
const core::stringw selectedSkin = skinSelector->getStringValue();
|
||||||
|
bool right = skinSelector->isRightButtonSelected();
|
||||||
UserConfigParams::m_skin_file = m_skins[selectedSkin];
|
UserConfigParams::m_skin_file = m_skins[selectedSkin];
|
||||||
irr_driver->unsetMaxTextureSize();
|
irr_driver->unsetMaxTextureSize();
|
||||||
bool prev_icon_theme = GUIEngine::getSkin()->hasIconTheme();
|
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());
|
GUIEngine::switchToScreen(MainMenuScreen::getInstance());
|
||||||
StateManager::get()->resetAndSetStack(screen_list);
|
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();
|
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");
|
GUIEngine::SpinnerWidget* font_size = getWidget<GUIEngine::SpinnerWidget>("font_size");
|
||||||
assert( font_size != NULL );
|
assert( font_size != NULL );
|
||||||
|
bool right = font_size->isRightButtonSelected();
|
||||||
UserConfigParams::m_font_size = font_size->getValue();
|
UserConfigParams::m_font_size = font_size->getValue();
|
||||||
GUIEngine::clear();
|
GUIEngine::clear();
|
||||||
GUIEngine::cleanUp();
|
GUIEngine::cleanUp();
|
||||||
@ -372,6 +379,11 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
|||||||
};
|
};
|
||||||
GUIEngine::switchToScreen(MainMenuScreen::getInstance());
|
GUIEngine::switchToScreen(MainMenuScreen::getInstance());
|
||||||
StateManager::get()->resetAndSetStack(screen_list);
|
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")
|
else if (name == "split_screen_horizontally")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user