diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-27 00:47:02 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-27 00:47:02 +0000 |
| commit | 00fecef0aebaa379dfc176ddc5d6488fae0e8272 (patch) | |
| tree | 2b77cc9c4a31f012bcddbf1fe8efa3f3ca1f6139 /pokemodr/TileUI.cpp | |
| parent | c4a3724a2b981e8dbc20f5d319a80bf364f2c7b7 (diff) | |
| download | sigen-00fecef0aebaa379dfc176ddc5d6488fae0e8272.tar.gz sigen-00fecef0aebaa379dfc176ddc5d6488fae0e8272.tar.xz sigen-00fecef0aebaa379dfc176ddc5d6488fae0e8272.zip | |
[FIX] Status and Weather classes in pokemod instead of hardcoded
[FIX] Added a Sprite class to allow for animations and whatnot
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@178 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/TileUI.cpp')
| -rw-r--r-- | pokemodr/TileUI.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/pokemodr/TileUI.cpp b/pokemodr/TileUI.cpp index 8dd1036f..302564c2 100644 --- a/pokemodr/TileUI.cpp +++ b/pokemodr/TileUI.cpp @@ -39,22 +39,10 @@ TileUI::~TileUI() void TileUI::initGui() { varAccessibility->addItems(Pokemod::DirectionStr.mid(0, Pokemod::D_End)); - varHMType->addItems(Pokemod::HMStr); varForce->addItems(Tile::ForceStr); varDirection->addItems(Pokemod::DirectionStr.mid(0, Pokemod::D_End)); } -void TileUI::refreshGui() -{ - varHMUnder->clear(); - for (int i = 0; i < pokemod()->tileCount(); ++i) - { - const Tile* tile = pokemod()->tile(i); - if (tile->id() != static_cast<Tile*>(original())->id()) - varHMUnder->addItem(tile->sprite(), tile->name(), tile->id()); - } -} - void TileUI::setGui() { varName->setText(static_cast<Tile*>(modified())->name()); @@ -62,10 +50,6 @@ void TileUI::setGui() for (int i = 0; i < varAccessibility->count(); ++i) varAccessibility->item(i)->setSelected(static_cast<Tile*>(modified())->from(i)); varWildChance->setValue(static_cast<Tile*>(modified())->wildChance()); - boxHMs->setChecked((static_cast<Tile*>(modified())->hmType() == INT_MAX) ? Qt::Unchecked : Qt::Checked); - varHMType->setCurrentIndex(static_cast<Tile*>(modified())->hmType()); - varHMUnder->setCurrentIndex(varHMUnder->findData(static_cast<Tile*>(modified())->under())); - varHMUnder->setEnabled((static_cast<Tile*>(modified())->hmType() == Pokemod::HM_Whirlpool) || (static_cast<Tile*>(modified())->hmType() == Pokemod::HM_Cut) || (static_cast<Tile*>(modified())->hmType() == Pokemod::HM_RockSmash)); boxForces->setChecked((static_cast<Tile*>(modified())->forceType() == INT_MAX) ? Qt::Unchecked : Qt::Checked); varForce->setCurrentIndex(static_cast<Tile*>(modified())->forceType()); varDirection->setCurrentIndex(static_cast<Tile*>(modified())->forceDirection()); @@ -117,27 +101,6 @@ void TileUI::on_varAccessibility_itemSelectionChanged() } } -void TileUI::on_boxHMs_toggled(const bool hm) -{ - if (!hm) - { - varHMType->setCurrentIndex(-1); - varHMUnder->setCurrentIndex(-1); - setGui(); - emit(changed(true)); - } -} - -void TileUI::on_varHMType_activated(const int hmType) -{ - static_cast<Tile*>(modified())->setHmType(hmType); -} - -void TileUI::on_varHMUnder_activated(const int hmUnder) -{ - static_cast<Tile*>(modified())->setUnder(varHMUnder->itemData(hmUnder, Qt::UserRole).toInt()); -} - void TileUI::on_boxForces_toggled(const bool forces) { if (!forces) |
