QTfrontend/hwform.cpp
changeset 157 8e3e11bb0a5f
parent 152 c558957ef644
child 183 57c2ef19f719
equal deleted inserted replaced
156:3d6e89bba384 157:8e3e11bb0a5f
   131 }
   131 }
   132 
   132 
   133 void HWForm::GoToDemos()
   133 void HWForm::GoToDemos()
   134 {
   134 {
   135 	QDir tmpdir;
   135 	QDir tmpdir;
   136 	tmpdir.cd(datadir->absolutePath());
   136 	tmpdir.cd(cfgdir->absolutePath());
   137 	tmpdir.cd("Demos");
   137 	tmpdir.cd("Demos");
   138 	tmpdir.setFilter(QDir::Files);
   138 	tmpdir.setFilter(QDir::Files);
   139 	ui.pagePlayDemo->DemosList->clear();
   139 	ui.pagePlayDemo->DemosList->clear();
   140 	ui.pagePlayDemo->DemosList->addItems(tmpdir.entryList(QStringList("*.hwd_1")).replaceInStrings(QRegExp("^(.*).hwd_1"), "\\1"));
   140 	ui.pagePlayDemo->DemosList->addItems(tmpdir.entryList(QStringList("*.hwd_1")).replaceInStrings(QRegExp("^(.*).hwd_1"), "\\1"));
   141 	ui.Pages->setCurrentIndex(ID_PAGE_DEMOS);
   141 	ui.Pages->setCurrentIndex(ID_PAGE_DEMOS);
   195 				tr("Please, select demo from the list above"),
   195 				tr("Please, select demo from the list above"),
   196 				tr("OK"));
   196 				tr("OK"));
   197 		return ;
   197 		return ;
   198 	}
   198 	}
   199 	game = new HWGame(config, 0);
   199 	game = new HWGame(config, 0);
   200 	game->PlayDemo(datadir->absolutePath() + "/Demos/" + curritem->text() + ".hwd_1");
   200 	game->PlayDemo(cfgdir->absolutePath() + "/Demos/" + curritem->text() + ".hwd_1");
   201 }
   201 }
   202 
   202 
   203 void HWForm::NetConnect()
   203 void HWForm::NetConnect()
   204 {
   204 {
   205 	hwnet = new HWNet(config);
   205 	hwnet = new HWNet(config);