mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-02 22:05:43 +02:00
Count days from 1 instead of 0 in map editor timed event UI
This commit is contained in:
parent
cee3521f57
commit
69b6e9c167
@ -28,7 +28,7 @@ TimedEvent::TimedEvent(QListWidgetItem * t, QWidget *parent) :
|
|||||||
ui->eventMessageText->setPlainText(params.value("message").toString());
|
ui->eventMessageText->setPlainText(params.value("message").toString());
|
||||||
ui->eventAffectsCpu->setChecked(params.value("computerAffected").toBool());
|
ui->eventAffectsCpu->setChecked(params.value("computerAffected").toBool());
|
||||||
ui->eventAffectsHuman->setChecked(params.value("humanAffected").toBool());
|
ui->eventAffectsHuman->setChecked(params.value("humanAffected").toBool());
|
||||||
ui->eventFirstOccurrence->setValue(params.value("firstOccurrence").toInt());
|
ui->eventFirstOccurrence->setValue(params.value("firstOccurrence").toInt() + 1);
|
||||||
ui->eventRepeatAfter->setValue(params.value("nextOccurrence").toInt());
|
ui->eventRepeatAfter->setValue(params.value("nextOccurrence").toInt());
|
||||||
|
|
||||||
auto playerList = params.value("players").toList();
|
auto playerList = params.value("players").toList();
|
||||||
@ -68,7 +68,7 @@ void TimedEvent::on_TimedEvent_finished(int result)
|
|||||||
descriptor["message"] = ui->eventMessageText->toPlainText();
|
descriptor["message"] = ui->eventMessageText->toPlainText();
|
||||||
descriptor["humanAffected"] = QVariant::fromValue(ui->eventAffectsHuman->isChecked());
|
descriptor["humanAffected"] = QVariant::fromValue(ui->eventAffectsHuman->isChecked());
|
||||||
descriptor["computerAffected"] = QVariant::fromValue(ui->eventAffectsCpu->isChecked());
|
descriptor["computerAffected"] = QVariant::fromValue(ui->eventAffectsCpu->isChecked());
|
||||||
descriptor["firstOccurrence"] = QVariant::fromValue(ui->eventFirstOccurrence->value());
|
descriptor["firstOccurrence"] = QVariant::fromValue(ui->eventFirstOccurrence->value() - 1);
|
||||||
descriptor["nextOccurrence"] = QVariant::fromValue(ui->eventRepeatAfter->value());
|
descriptor["nextOccurrence"] = QVariant::fromValue(ui->eventRepeatAfter->value());
|
||||||
|
|
||||||
QVariantList players;
|
QVariantList players;
|
||||||
|
@ -72,7 +72,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="eventFirstOccurrence"/>
|
<widget class="QSpinBox" name="eventFirstOccurrence">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user