From 3fa8f8764bae2e2fa4d558f6282f1237444147d9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 29 Dec 2008 10:54:11 -0500 Subject: Fixed up Sigmod and it now uses check macros --- sigmodr/SpeciesUI.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sigmodr/SpeciesUI.cpp') 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(modified())->backFemaleSprite())); } varSkin->setCurrentIndex(varSkin->findData(qobject_cast(modified())->skin())); - boxGenderChance->setChecked((qobject_cast(modified())->genderFactor().denominator() < qobject_cast(modified())->genderFactor().numerator()) ? Qt::Checked : Qt::Unchecked); + boxGenderChance->setChecked((qobject_cast(modified())->genderFactor() < 0) ? Qt::Checked : Qt::Unchecked); varGenderChance->setValue(qobject_cast(modified())->genderFactor()); varEggSpecies->setCurrentIndex(varEggSpecies->findData(qobject_cast(modified())->eggSpecies())); varEggSteps->setValue(qobject_cast(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(modified())->setGenderFactor(Sigcore::Fraction((genderChance ? 1 : 2), 1)); + qobject_cast(modified())->setGenderFactor(Sigcore::Fraction((genderChance ? 1 : -1), 1)); } void Sigmodr::SpeciesUI::on_varGenderChance_valueChanged(const Sigcore::Fraction& genderChance) -- cgit