summaryrefslogtreecommitdiffstats
path: root/sigmodr/SpeciesUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/SpeciesUI.cpp')
-rw-r--r--sigmodr/SpeciesUI.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sigmodr/SpeciesUI.cpp b/sigmodr/SpeciesUI.cpp
index a77ae536..a020c2d8 100644
--- a/sigmodr/SpeciesUI.cpp
+++ b/sigmodr/SpeciesUI.cpp
@@ -48,6 +48,7 @@ void Sigmodr::SpeciesUI::initGui()
varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Normal], QVariant::fromValue(Sigmod::Species::Normal));
varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Fast], QVariant::fromValue(Sigmod::Species::Fast));
varGrowth->addItem(Sigmod::Species::StyleStr[Sigmod::Species::Erratic], QVariant::fromValue(Sigmod::Species::Erratic));
+ varEffortValue->setMaximum(sigmod()->rules()->maxEVPerStat() ? sigmod()->rules()->maxEVPerStat() : INT_MAX);
}
void Sigmodr::SpeciesUI::refreshGui()
@@ -192,7 +193,7 @@ void Sigmodr::SpeciesUI::setGui()
varFemaleBack->setCurrentIndex(varFemaleBack->findData(qobject_cast<Sigmod::Species*>(modified())->backFemaleSprite()));
}
varSkin->setCurrentIndex(varSkin->findData(qobject_cast<Sigmod::Species*>(modified())->skin()));
- boxGenderChance->setChecked((qobject_cast<Sigmod::Species*>(modified())->genderFactor().denominator() < qobject_cast<Sigmod::Species*>(modified())->genderFactor().numerator()) ? Qt::Checked : Qt::Unchecked);
+ boxGenderChance->setChecked((qobject_cast<Sigmod::Species*>(modified())->genderFactor() < 0) ? Qt::Checked : Qt::Unchecked);
varGenderChance->setValue(qobject_cast<Sigmod::Species*>(modified())->genderFactor());
varEggSpecies->setCurrentIndex(varEggSpecies->findData(qobject_cast<Sigmod::Species*>(modified())->eggSpecies()));
varEggSteps->setValue(qobject_cast<Sigmod::Species*>(modified())->eggSteps());
@@ -316,7 +317,7 @@ void Sigmodr::SpeciesUI::on_varSkin_currentIndexChanged(const int skin)
void Sigmodr::SpeciesUI::on_boxGenderChance_clicked(const bool genderChance)
{
- qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(Sigcore::Fraction((genderChance ? 1 : 2), 1));
+ qobject_cast<Sigmod::Species*>(modified())->setGenderFactor(Sigcore::Fraction((genderChance ? 1 : -1), 1));
}
void Sigmodr::SpeciesUI::on_varGenderChance_valueChanged(const Sigcore::Fraction& genderChance)