117 Tips << tr("Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!", "Tips"); |
117 Tips << tr("Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!", "Tips"); |
118 Tips << tr("The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing.", "Tips"); |
118 Tips << tr("The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing.", "Tips"); |
119 Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips"); |
119 Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips"); |
120 Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips"); |
120 Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips"); |
121 Tips << tr("No hedgehogs were harmed in making this game.", "Tips"); |
121 Tips << tr("No hedgehogs were harmed in making this game.", "Tips"); |
122 |
122 |
123 |
123 |
124 if(isDevBuild) |
124 if(isDevBuild) |
125 mainNote->setText(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!")); |
125 mainNote->setText(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!")); |
126 else |
126 else |
127 mainNote->setText(QLabel::tr("Tip: ") + Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]); |
127 mainNote->setText(QLabel::tr("Tip: ") + Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]); |
367 void PageEditTeam::testSound() |
367 void PageEditTeam::testSound() |
368 { |
368 { |
369 Mix_Chunk *sound; |
369 Mix_Chunk *sound; |
370 QDir tmpdir; |
370 QDir tmpdir; |
371 mySdli->SDLMusicInit(); |
371 mySdli->SDLMusicInit(); |
372 |
372 |
373 tmpdir.cd(datadir->absolutePath()); |
373 tmpdir.cd(datadir->absolutePath()); |
374 tmpdir.cd("Sounds/voices"); |
374 tmpdir.cd("Sounds/voices"); |
375 tmpdir.cd(CBVoicepack->currentText()); |
375 tmpdir.cd(CBVoicepack->currentText()); |
376 QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files); |
376 QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files); |
377 if (list.size()) { |
377 if (list.size()) { |
955 tmpdir.cd("Missions/Training"); |
955 tmpdir.cd("Missions/Training"); |
956 tmpdir.setFilter(QDir::Files); |
956 tmpdir.setFilter(QDir::Files); |
957 CBSelect->addItems(tmpdir.entryList(QStringList("*.lua")).replaceInStrings(QRegExp("^(.*)\\.lua"), "\\1")); |
957 CBSelect->addItems(tmpdir.entryList(QStringList("*.lua")).replaceInStrings(QRegExp("^(.*)\\.lua"), "\\1")); |
958 |
958 |
959 pageLayout->addWidget(CBSelect, 1, 1); |
959 pageLayout->addWidget(CBSelect, 1, 1); |
960 |
960 |
961 BtnStartTrain = new QPushButton(this); |
961 BtnStartTrain = new QPushButton(this); |
962 BtnStartTrain->setFont(*font14); |
962 BtnStartTrain->setFont(*font14); |
963 BtnStartTrain->setText(QPushButton::tr("Go!")); |
963 BtnStartTrain->setText(QPushButton::tr("Go!")); |
964 pageLayout->addWidget(BtnStartTrain, 1, 2); |
964 pageLayout->addWidget(BtnStartTrain, 1, 2); |
965 |
965 |
1071 for(int i = 0, r = 0; i < list.size(); i += 8, r++) |
1071 for(int i = 0, r = 0; i < list.size(); i += 8, r++) |
1072 { |
1072 { |
1073 QTableWidgetItem * item; |
1073 QTableWidgetItem * item; |
1074 item = new QTableWidgetItem(list[i + 1]); // room name |
1074 item = new QTableWidgetItem(list[i + 1]); // room name |
1075 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
1075 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
1076 |
1076 |
1077 // pick appropriate room icon and tooltip (game in progress yes/no; later maybe locked rooms etc.) |
1077 // pick appropriate room icon and tooltip (game in progress yes/no; later maybe locked rooms etc.) |
1078 if(list[i].compare("True")) |
1078 if(list[i].compare("True")) |
1079 { |
1079 { |
1080 item->setIcon(QIcon(":/res/iconTime.png"));// game is in lobby |
1080 item->setIcon(QIcon(":/res/iconTime.png"));// game is in lobby |
1081 item->setToolTip(tr("This game is in lobby.\nYou may join and start playing once the game starts.")); |
1081 item->setToolTip(tr("This game is in lobby.\nYou may join and start playing once the game starts.")); |
1110 else if (list[i+5] == "+maze+") |
1110 else if (list[i+5] == "+maze+") |
1111 item = new QTableWidgetItem(tr("Random Maze")); |
1111 item = new QTableWidgetItem(tr("Random Maze")); |
1112 else |
1112 else |
1113 { |
1113 { |
1114 item = new QTableWidgetItem(list[i + 5]); // selected map |
1114 item = new QTableWidgetItem(list[i + 5]); // selected map |
1115 |
1115 |
1116 // check to see if we've got this map |
1116 // check to see if we've got this map |
1117 // not perfect but a start |
1117 // not perfect but a start |
1118 if(!mapList->contains(list[i + 5])) |
1118 if(!mapList->contains(list[i + 5])) |
1119 item->setForeground(QBrush(QColor(255, 0, 0))); |
1119 item->setForeground(QBrush(QColor(255, 0, 0))); |
1120 } |
1120 } |
1121 |
1121 |
1122 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
1122 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
1123 item->setToolTip(tr("Games may be played on precreated or randomized maps.")); |
1123 item->setToolTip(tr("Games may be played on precreated or randomized maps.")); |
1124 roomsList->setItem(r, 4, item); |
1124 roomsList->setItem(r, 4, item); |
1125 |
1125 |
1126 item = new QTableWidgetItem(list[i + 6].left(20)); // selected game scheme |
1126 item = new QTableWidgetItem(list[i + 6].left(20)); // selected game scheme |
1286 glGMLayout->addWidget(TBW_disablegirders,3,3,1,1); |
1286 glGMLayout->addWidget(TBW_disablegirders,3,3,1,1); |
1287 |
1287 |
1288 TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects.png"); |
1288 TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects.png"); |
1289 TBW_disablelandobjects->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Land Objects") + "</b>:<br />" + tr("Disable land objects when generating random maps.")); |
1289 TBW_disablelandobjects->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Land Objects") + "</b>:<br />" + tr("Disable land objects when generating random maps.")); |
1290 glGMLayout->addWidget(TBW_disablelandobjects,4,0,1,1); |
1290 glGMLayout->addWidget(TBW_disablelandobjects,4,0,1,1); |
|
1291 |
|
1292 TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival.png"); |
|
1293 TBW_aisurvival->setToolTip("<b>" + ToggleButtonWidget::tr("AI Survival Mode") + "</b>:<br />" + tr("AI respawns on death.")); |
|
1294 glGMLayout->addWidget(TBW_aisurvival,4,1,1,1); |
1291 |
1295 |
1292 // Right |
1296 // Right |
1293 QLabel * l; |
1297 QLabel * l; |
1294 |
1298 |
1295 l = new QLabel(gbBasicSettings); |
1299 l = new QLabel(gbBasicSettings); |
1470 mapper->addMapping(TBW_king, 13); |
1474 mapper->addMapping(TBW_king, 13); |
1471 mapper->addMapping(TBW_placehog, 14); |
1475 mapper->addMapping(TBW_placehog, 14); |
1472 mapper->addMapping(TBW_sharedammo, 15); |
1476 mapper->addMapping(TBW_sharedammo, 15); |
1473 mapper->addMapping(TBW_disablegirders, 16); |
1477 mapper->addMapping(TBW_disablegirders, 16); |
1474 mapper->addMapping(TBW_disablelandobjects, 17); |
1478 mapper->addMapping(TBW_disablelandobjects, 17); |
1475 mapper->addMapping(SB_DamageModifier, 18); |
1479 mapper->addMapping(TBW_aisurvival, 18); |
1476 mapper->addMapping(SB_TurnTime, 19); |
1480 mapper->addMapping(SB_DamageModifier, 19); |
1477 mapper->addMapping(SB_InitHealth, 20); |
1481 mapper->addMapping(SB_TurnTime, 20); |
1478 mapper->addMapping(SB_SuddenDeath, 21); |
1482 mapper->addMapping(SB_InitHealth, 21); |
1479 mapper->addMapping(SB_CaseProb, 22); |
1483 mapper->addMapping(SB_SuddenDeath, 22); |
1480 mapper->addMapping(SB_MinesTime, 23); |
1484 mapper->addMapping(SB_CaseProb, 23); |
1481 mapper->addMapping(SB_Mines, 24); |
1485 mapper->addMapping(SB_MinesTime, 24); |
1482 mapper->addMapping(SB_MineDuds, 25); |
1486 mapper->addMapping(SB_Mines, 25); |
1483 mapper->addMapping(SB_Explosives, 26); |
1487 mapper->addMapping(SB_MineDuds, 26); |
|
1488 mapper->addMapping(SB_Explosives, 27); |
1484 |
1489 |
1485 mapper->toFirst(); |
1490 mapper->toFirst(); |
1486 } |
1491 } |
1487 |
1492 |
1488 void PageScheme::newRow() |
1493 void PageScheme::newRow() |
1514 QGridLayout * pageLayout = new QGridLayout(this); |
1519 QGridLayout * pageLayout = new QGridLayout(this); |
1515 |
1520 |
1516 // 0 |
1521 // 0 |
1517 pbAsk = addButton(tr("Fetch data"), pageLayout, 0, 0, 1, 3); |
1522 pbAsk = addButton(tr("Fetch data"), pageLayout, 0, 0, 1, 3); |
1518 connect(pbAsk, SIGNAL(clicked()), this, SIGNAL(askServerVars())); |
1523 connect(pbAsk, SIGNAL(clicked()), this, SIGNAL(askServerVars())); |
1519 |
1524 |
1520 // 1 |
1525 // 1 |
1521 QLabel * lblSMN = new QLabel(this); |
1526 QLabel * lblSMN = new QLabel(this); |
1522 lblSMN->setText(tr("Server message for latest version:")); |
1527 lblSMN->setText(tr("Server message for latest version:")); |
1523 pageLayout->addWidget(lblSMN, 1, 0); |
1528 pageLayout->addWidget(lblSMN, 1, 0); |
1524 |
1529 |
1548 |
1553 |
1549 tb = new QTextBrowser(this); |
1554 tb = new QTextBrowser(this); |
1550 pageLayout->addWidget(tb, 4, 1, 1, 2); |
1555 pageLayout->addWidget(tb, 4, 1, 1, 2); |
1551 connect(leServerMessageNew, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &))); |
1556 connect(leServerMessageNew, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &))); |
1552 connect(leServerMessageOld, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &))); |
1557 connect(leServerMessageOld, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &))); |
1553 |
1558 |
1554 // 5 |
1559 // 5 |
1555 pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0); |
1560 pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0); |
1556 |
1561 |
1557 // 6 |
1562 // 6 |
1558 pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3); |
1563 pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3); |
1559 |
1564 |
1560 // 7 |
1565 // 7 |
1561 BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true); |
1566 BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true); |