153 connect(randButton[i], SIGNAL(clicked()), signalMapper, SLOT(map())); |
153 connect(randButton[i], SIGNAL(clicked()), signalMapper, SLOT(map())); |
154 signalMapper->setMapping(randButton[i], i); |
154 signalMapper->setMapping(randButton[i], i); |
155 |
155 |
156 } |
156 } |
157 |
157 |
158 randTeamButton = addButton("Random Team", GBHLayout, 9, false); |
158 randTeamButton = addButton(QPushButton::tr("Random Team"), GBHLayout, 9, false); |
159 |
159 |
160 vbox1->addWidget(GBoxHedgehogs); |
160 vbox1->addWidget(GBoxHedgehogs); |
161 |
161 |
162 |
162 |
163 GBoxTeam = new QGroupBox(this); |
163 GBoxTeam = new QGroupBox(this); |
181 |
181 |
182 CBGrave = new QComboBox(GBoxTeam); |
182 CBGrave = new QComboBox(GBoxTeam); |
183 CBGrave->setMaxCount(65535); |
183 CBGrave->setMaxCount(65535); |
184 CBGrave->setIconSize(QSize(32, 32)); |
184 CBGrave->setIconSize(QSize(32, 32)); |
185 GBTLayout->addWidget(CBGrave); |
185 GBTLayout->addWidget(CBGrave); |
|
186 |
|
187 CBFlag = new QComboBox(GBoxTeam); |
|
188 CBFlag->setMaxCount(65535); |
|
189 CBFlag->setIconSize(QSize(22, 15)); |
|
190 GBTLayout->addWidget(CBFlag); |
186 |
191 |
187 { |
192 { |
188 QHBoxLayout * hbox = new QHBoxLayout(); |
193 QHBoxLayout * hbox = new QHBoxLayout(); |
189 CBVoicepack = new QComboBox(GBoxTeam); |
194 CBVoicepack = new QComboBox(GBoxTeam); |
190 { |
195 { |
228 for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
233 for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
229 { |
234 { |
230 QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + *it); |
235 QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + *it); |
231 QIcon icon(pix.copy(0, 0, 32, 32)); |
236 QIcon icon(pix.copy(0, 0, 32, 32)); |
232 CBGrave->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
237 CBGrave->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
|
238 } |
|
239 |
|
240 tmpdir.cd(datadir->absolutePath()); |
|
241 tmpdir.cd("Graphics/Flags"); |
|
242 list = tmpdir.entryList(QStringList("*.png")); |
|
243 for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
|
244 { |
|
245 QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it); |
|
246 QIcon icon(pix.copy(0, 0, 22, 15)); |
|
247 CBFlag->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
233 } |
248 } |
234 |
249 |
235 vbox1->addStretch(); |
250 vbox1->addStretch(); |
236 vbox2->addStretch(); |
251 vbox2->addStretch(); |
237 // vbox3->addStretch(); |
252 // vbox3->addStretch(); |
386 |
401 |
387 WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); |
402 WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); |
388 WeaponsName = new QComboBox(this); |
403 WeaponsName = new QComboBox(this); |
389 WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); |
404 WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); |
390 WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); |
405 WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); |
|
406 |
|
407 WeaponTooltip = new QCheckBox(this); |
|
408 WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips")); |
|
409 WeaponsLayout->addWidget(WeaponTooltip, 2, 0, 1, 2); |
|
410 |
391 gbTBLayout->addWidget(groupWeapons, 1, 0); |
411 gbTBLayout->addWidget(groupWeapons, 1, 0); |
392 } |
412 } |
393 |
413 |
394 { |
414 { |
395 AGGroupBox = new IconedGroupBox(this); |
415 AGGroupBox = new IconedGroupBox(this); |
1291 pageLayout->setColumnStretch(3, 10); |
1311 pageLayout->setColumnStretch(3, 10); |
1292 |
1312 |
1293 BtnLAN = addButton(tr("LAN game"), pageLayout, 1, 2); |
1313 BtnLAN = addButton(tr("LAN game"), pageLayout, 1, 2); |
1294 BtnOfficialServer = addButton(tr("Official server"), pageLayout, 2, 2); |
1314 BtnOfficialServer = addButton(tr("Official server"), pageLayout, 2, 2); |
1295 |
1315 |
|
1316 // hack: temporary deactivated - requires server modifications that aren't backward compatible (yet) |
|
1317 BtnOfficialServer->setEnabled(false); |
|
1318 |
1296 BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
1319 BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
1297 } |
1320 } |