diff options
Diffstat (limited to 'sigmodr/SigmodUI.cpp')
| -rw-r--r-- | sigmodr/SigmodUI.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sigmodr/SigmodUI.cpp b/sigmodr/SigmodUI.cpp index 31d37a13..4b3defca 100644 --- a/sigmodr/SigmodUI.cpp +++ b/sigmodr/SigmodUI.cpp @@ -67,7 +67,9 @@ void Sigmodr::SigmodUI::setGui() varTitle->setText(qobject_cast<Sigmod::Sigmod*>(modified())->title()); varVersion->setText(qobject_cast<Sigmod::Sigmod*>(modified())->version()); varDescription->setText(qobject_cast<Sigmod::Sigmod*>(modified())->description()); + varSinglePlayer->setChecked(qobject_cast<Sigmod::Sigmod*>(modified())->singlePlayer() ? Qt::Checked : Qt::Unchecked); varMap->setCurrentIndex(varMap->findData(qobject_cast<Sigmod::Sigmod*>(modified())->startMap())); + varMap->setEnabled(qobject_cast<Sigmod::Sigmod*>(modified())->singlePlayer()); m_lastMap = qobject_cast<Sigmod::Sigmod*>(modified())->startMap(); if (resetWarps) { @@ -86,6 +88,7 @@ void Sigmodr::SigmodUI::setGui() varWarp->blockSignals(blocked); } varWarp->setCurrentIndex(varWarp->findData(qobject_cast<Sigmod::Sigmod*>(modified())->startWarp())); + varWarp->setEnabled(qobject_cast<Sigmod::Sigmod*>(modified())->singlePlayer()); } void Sigmodr::SigmodUI::apply() @@ -123,6 +126,11 @@ void Sigmodr::SigmodUI::on_varDescription_textChanged(const QString& description varDescription->setCursorPosition(cursor); } +void Sigmodr::SigmodUI::on_varSinglePlayer_clicked(const bool singlePlayer) +{ + qobject_cast<Sigmod::Sigmod*>(modified())->setSinglePlayer(singlePlayer); +} + void Sigmodr::SigmodUI::on_varMap_activated(const int map) { qobject_cast<Sigmod::Sigmod*>(modified())->setStartMap(varMap->itemData(map).toInt()); |
