From: James Turner Date: Sat, 10 Jan 2015 14:57:59 +0000 (+0000) Subject: Launcher: select season. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8bfb63e4edb514c279ffed1ca9bce6b9b9d2b29e;p=flightgear.git Launcher: select season. --- diff --git a/src/GUI/Launcher.ui b/src/GUI/Launcher.ui index 46060e728..05ddb78b3 100644 --- a/src/GUI/Launcher.ui +++ b/src/GUI/Launcher.ui @@ -432,6 +432,31 @@ + + + + + + Season: + + + + + + + + Summer + + + + + Winter + + + + + + diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index 0d9eb2374..815939177 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -654,6 +654,8 @@ QtLauncher::QtLauncher() : connect(m_ui->timeOfDayCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateSettingsSummary())); + connect(m_ui->seasonCombo, SIGNAL(currentIndexChanged(int)), + this, SLOT(updateSettingsSummary())); connect(m_ui->fetchRealWxrCheckbox, SIGNAL(toggled(bool)), this, SLOT(updateSettingsSummary())); connect(m_ui->rembrandtCheckbox, SIGNAL(toggled(bool)), @@ -712,6 +714,7 @@ void QtLauncher::restoreSettings() m_ui->fetchRealWxrCheckbox->setChecked(settings.value("enable-realwx", true).toBool()); m_ui->startPausedCheck->setChecked(settings.value("start-paused", false).toBool()); m_ui->timeOfDayCombo->setCurrentIndex(settings.value("timeofday", 0).toInt()); + m_ui->seasonCombo->setCurrentIndex(settings.value("season", 0).toInt()); // full paths to -set.xml files m_recentAircraft = settings.value("recent-aircraft").toStringList(); @@ -758,6 +761,7 @@ void QtLauncher::saveSettings() settings.setValue("recent-aircraft", m_recentAircraft); settings.setValue("recent-airports", m_recentAirports); settings.setValue("timeofday", m_ui->timeOfDayCombo->currentIndex()); + settings.setValue("season", m_ui->seasonCombo->currentIndex()); QStringList paths; for (int i=0; isceneryPathsList->count(); ++i) { @@ -843,6 +847,11 @@ void QtLauncher::onRun() opt->addOption("timeofday", dayval.toStdString()); } + if (m_ui->seasonCombo->currentIndex() != 0) { + QString dayval = m_ui->timeOfDayCombo->currentText().toLower(); + opt->addOption("season", dayval.toStdString()); + } + // scenery paths for (int i=0; isceneryPathsList->count(); ++i) { QString path = m_ui->sceneryPathsList->item(i)->text(); @@ -1125,6 +1134,10 @@ void QtLauncher::updateSettingsSummary() summary.append(QString(m_ui->timeOfDayCombo->currentText().toLower())); } + if (m_ui->seasonCombo->currentIndex() > 0) { + summary.append(QString(m_ui->seasonCombo->currentText().toLower())); + } + if (m_ui->rembrandtCheckbox->isChecked()) { summary.append("Rembrandt enabled"); } else if (m_ui->msaaCheckbox->isChecked()) {