equal
deleted
inserted
replaced
50 GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Gameplay"), GBoxOptions), 0, 0); |
50 GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Gameplay"), GBoxOptions), 0, 0); |
51 |
51 |
52 Scripts = new QComboBox(GBoxOptions); |
52 Scripts = new QComboBox(GBoxOptions); |
53 GBoxOptionsLayout->addWidget(Scripts, 0, 1); |
53 GBoxOptionsLayout->addWidget(Scripts, 0, 1); |
54 |
54 |
55 Scripts->addItem(QComboBox::tr("Normal")); |
55 Scripts->addItem("Normal"); |
56 Scripts->insertSeparator(1); |
56 Scripts->insertSeparator(1); |
57 |
57 |
58 for (int i = 0; i < scriptList->size(); ++i) { |
58 for (int i = 0; i < scriptList->size(); ++i) { |
59 QString script = (*scriptList)[i].remove(".lua", Qt::CaseInsensitive); |
59 QString script = (*scriptList)[i].remove(".lua", Qt::CaseInsensitive); |
60 QList<QVariant> scriptInfo; |
60 QList<QVariant> scriptInfo; |
381 } |
381 } |
382 } |
382 } |
383 |
383 |
384 void GameCFGWidget::mapChanged(const QString & value) |
384 void GameCFGWidget::mapChanged(const QString & value) |
385 { |
385 { |
386 if(pMapContainer->getCurrentIsMission()) |
386 if(isEnabled() && pMapContainer->getCurrentIsMission()) |
387 { |
387 { |
388 Scripts->setEnabled(false); |
388 Scripts->setEnabled(false); |
389 Scripts->setCurrentIndex(0); |
389 Scripts->setCurrentIndex(0); |
390 |
390 |
391 if (pMapContainer->getCurrentScheme() == "locked") |
391 if (pMapContainer->getCurrentScheme() == "locked") |
456 for(int i = 0; i < size; ++i) |
456 for(int i = 0; i < size; ++i) |
457 sl << schemeData(i).toString(); |
457 sl << schemeData(i).toString(); |
458 |
458 |
459 emit paramChanged("SCHEME", sl); |
459 emit paramChanged("SCHEME", sl); |
460 |
460 |
461 if (bindEntries->isEnabled() && bindEntries->isChecked()) { |
461 if (isEnabled() && bindEntries->isEnabled() && bindEntries->isChecked()) { |
462 QString schemeName = GameSchemes->itemText(index); |
462 QString schemeName = GameSchemes->itemText(index); |
463 for (int i = 0; i < WeaponsName->count(); i++) { |
463 for (int i = 0; i < WeaponsName->count(); i++) { |
464 QString weapName = WeaponsName->itemText(i); |
464 QString weapName = WeaponsName->itemText(i); |
465 int res = QString::compare(weapName, schemeName, Qt::CaseSensitive); |
465 int res = QString::compare(weapName, schemeName, Qt::CaseSensitive); |
466 if (0 == res) { |
466 if (0 == res) { |
472 } |
472 } |
473 } |
473 } |
474 |
474 |
475 void GameCFGWidget::scriptChanged(int index) |
475 void GameCFGWidget::scriptChanged(int index) |
476 { |
476 { |
477 if(index > 0) |
477 if(isEnabled() && index > 0) |
478 { |
478 { |
479 QString scheme = Scripts->itemData(Scripts->currentIndex()).toList()[1].toString(); |
479 QString scheme = Scripts->itemData(Scripts->currentIndex()).toList()[1].toString(); |
480 QString weapons = Scripts->itemData(Scripts->currentIndex()).toList()[2].toString(); |
480 QString weapons = Scripts->itemData(Scripts->currentIndex()).toList()[2].toString(); |
481 |
481 |
482 if (scheme == "locked") |
482 if (scheme == "locked") |