reverting changes

This commit is contained in:
titiger 2016-12-14 13:46:17 +01:00
parent 56009d0068
commit c741c67bf7
2 changed files with 41 additions and 55 deletions

View File

@ -39,7 +39,6 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
MenuState(program, mainMenu, "config")
{
try {
reloadingUI=false;
containerName = "Options";
this->parentUI=parentUI;
Lang &lang= Lang::getInstance();
@ -385,8 +384,6 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
void MenuStateOptions::reloadUI() {
Lang &lang= Lang::getInstance();
reloadingUI=true;
try {
console.resetFonts();
GraphicComponent::reloadFontsForRegisterGraphicComponents(containerName);
mainMessageBox.init(lang.getString("Ok"));
@ -445,13 +442,6 @@ void MenuStateOptions::reloadUI() {
labelTransifexUserLabel.setText(lang.getString("TransifexUserName"));
labelTransifexPwdLabel.setText(lang.getString("TransifexPwd"));
labelTransifexI18NLabel.setText(lang.getString("TransifexI18N"));
reloadingUI=false;
}
catch(exception &e) {
reloadingUI=false;
throw(e);
}
}
void MenuStateOptions::setupTransifexUI() {
@ -566,8 +556,6 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
showMessageBox(lang.getString("RestartNeeded"), lang.getString("FontSizeAdjustmentChanged"), false);
return;
}
reloadingUI=true;
sleep(100);
saveConfig();
//mainMenu->setState(new MenuStateRoot(program, mainMenu));
reloadUI();
@ -1057,7 +1045,6 @@ void MenuStateOptions::keyPress(SDL_KeyboardEvent c) {
}
void MenuStateOptions::render(){
if(reloadingUI==true) return;// no render to avoid crash on windows
Renderer &renderer= Renderer::getInstance();
if(mainMessageBox.getEnabled()){

View File

@ -23,7 +23,6 @@ namespace Glest{ namespace Game{
class MenuStateOptions: public MenuState{
private:
bool reloadingUI;
GraphicButton buttonOk;
GraphicButton buttonReturn;