QTfrontend/hwform.cpp
changeset 580 d3ebf84e9fad
parent 579 94db15de0392
child 581 909141b17f68
equal deleted inserted replaced
579:94db15de0392 580:d3ebf84e9fad
   154 void HWForm::GoToSaves()
   154 void HWForm::GoToSaves()
   155 {
   155 {
   156 	QDir tmpdir;
   156 	QDir tmpdir;
   157 	tmpdir.cd(cfgdir->absolutePath());
   157 	tmpdir.cd(cfgdir->absolutePath());
   158 	tmpdir.cd("Saves");
   158 	tmpdir.cd("Saves");
   159 	ui.pagePlayDemo->FillFromDir(tmpdir);
   159 	ui.pagePlayDemo->FillFromDir(tmpdir, "hws_" + *cProtoVer);
   160 
   160 
   161 	GoToPage(ID_PAGE_DEMOS);
   161 	GoToPage(ID_PAGE_DEMOS);
   162 }
   162 }
   163 
   163 
   164 void HWForm::GoToDemos()
   164 void HWForm::GoToDemos()
   165 {
   165 {
   166 	QDir tmpdir;
   166 	QDir tmpdir;
   167 	tmpdir.cd(cfgdir->absolutePath());
   167 	tmpdir.cd(cfgdir->absolutePath());
   168 	tmpdir.cd("Demos");
   168 	tmpdir.cd("Demos");
   169 	ui.pagePlayDemo->FillFromDir(tmpdir);
   169 	ui.pagePlayDemo->FillFromDir(tmpdir, "hwd_" + *cProtoVer);
   170 
   170 
   171 	GoToPage(ID_PAGE_DEMOS);
   171 	GoToPage(ID_PAGE_DEMOS);
   172 }
   172 }
   173 
   173 
   174 void HWForm::GoToNet()
   174 void HWForm::GoToNet()
   306 				tr("Please, select demo from the list above"),
   306 				tr("Please, select demo from the list above"),
   307 				tr("OK"));
   307 				tr("OK"));
   308 		return ;
   308 		return ;
   309 	}
   309 	}
   310 	CreateGame(0, 0);
   310 	CreateGame(0, 0);
   311 	game->PlayDemo(cfgdir->absolutePath() + "/Demos/" + curritem->text() + ".hwd_" + *cProtoVer);
   311 	game->PlayDemo(curritem->data(Qt::UserRole).toString());
   312 }
   312 }
   313 
   313 
   314 void HWForm::NetConnectServer()
   314 void HWForm::NetConnectServer()
   315 {
   315 {
   316   QListWidgetItem * curritem = ui.pageNet->pUdpClient->serversList->currentItem();
   316   QListWidgetItem * curritem = ui.pageNet->pUdpClient->serversList->currentItem();