QTfrontend/hwform.cpp
changeset 8098 4efee370e2de
parent 8057 93e16240f178
child 8136 c2196b1dccb4
equal deleted inserted replaced
8095:df61e150eb70 8098:4efee370e2de
   125     SDLInteraction::instance().setMusicTrack("/Music/main_theme.ogg");
   125     SDLInteraction::instance().setMusicTrack("/Music/main_theme.ogg");
   126 
   126 
   127 #ifdef USE_XFIRE
   127 #ifdef USE_XFIRE
   128     xfire_init();
   128     xfire_init();
   129 #endif
   129 #endif
   130     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
   130     gameSettings = new QSettings("physfs://hedgewars.ini", QSettings::IniFormat);
   131     frontendEffects = gameSettings->value("frontend/effects", true).toBool();
   131     frontendEffects = gameSettings->value("frontend/effects", true).toBool();
   132     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex());
   132     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex());
   133 
   133 
   134     this->setStyleSheet(styleSheet);
   134     this->setStyleSheet(styleSheet);
   135     ui.setupUi(this);
   135     ui.setupUi(this);
   137     //setFocusPolicy(Qt::StrongFocus);
   137     //setFocusPolicy(Qt::StrongFocus);
   138     CustomizePalettes();
   138     CustomizePalettes();
   139 
   139 
   140     ui.pageOptions->CBResolution->addItems(SDLInteraction::instance().getResolutions());
   140     ui.pageOptions->CBResolution->addItems(SDLInteraction::instance().getResolutions());
   141 
   141 
   142     config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
   142     config = new GameUIConfig(this, "physfs://hedgewars.ini");
   143 
   143 
   144     ui.pageVideos->init(config);
   144     ui.pageVideos->init(config);
   145 
   145 
   146 #ifdef __APPLE__
   146 #ifdef __APPLE__
   147     panel = new M3Panel;
   147     panel = new M3Panel;
   634     ui.Pages->setCurrentIndex(id);
   634     ui.Pages->setCurrentIndex(id);
   635 
   635 
   636 
   636 
   637    /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
   637    /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
   638         stopAnim = true;
   638         stopAnim = true;
   639 	This were disabled due to broken flake animations.  I believe the more general problems w/ opacity that forced its disable makes blocking these
   639     This were disabled due to broken flake animations.  I believe the more general problems w/ opacity that forced its disable makes blocking these
   640 	unnecessary.
   640     unnecessary.
   641    */
   641    */
   642 
   642 
   643 #if (QT_VERSION >= 0x040600)
   643 #if (QT_VERSION >= 0x040600)
   644     if (!stopAnim)
   644     if (!stopAnim)
   645     {
   645     {
   693 
   693 
   694         // start animations
   694         // start animations
   695         animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
   695         animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
   696         animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
   696         animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
   697 
   697 
   698     	/* this is for the situation when the animation below is interrupted by a new animation.  For some reason, finished is not being fired */ 	
   698         /* this is for the situation when the animation below is interrupted by a new animation.  For some reason, finished is not being fired */
   699     	for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
   699         for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
   700     }
   700     }
   701 #endif
   701 #endif
   702 }
   702 }
   703 
   703 
   704 void HWForm::GoBack()
   704 void HWForm::GoBack()