From 00fecef0aebaa379dfc176ddc5d6488fae0e8272 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 27 May 2008 00:47:02 +0000 Subject: [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 --- pokemodr/TileUI.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'pokemodr/TileUI.cpp') 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(original())->id()) - varHMUnder->addItem(tile->sprite(), tile->name(), tile->id()); - } -} - void TileUI::setGui() { varName->setText(static_cast(modified())->name()); @@ -62,10 +50,6 @@ void TileUI::setGui() for (int i = 0; i < varAccessibility->count(); ++i) varAccessibility->item(i)->setSelected(static_cast(modified())->from(i)); varWildChance->setValue(static_cast(modified())->wildChance()); - boxHMs->setChecked((static_cast(modified())->hmType() == INT_MAX) ? Qt::Unchecked : Qt::Checked); - varHMType->setCurrentIndex(static_cast(modified())->hmType()); - varHMUnder->setCurrentIndex(varHMUnder->findData(static_cast(modified())->under())); - varHMUnder->setEnabled((static_cast(modified())->hmType() == Pokemod::HM_Whirlpool) || (static_cast(modified())->hmType() == Pokemod::HM_Cut) || (static_cast(modified())->hmType() == Pokemod::HM_RockSmash)); boxForces->setChecked((static_cast(modified())->forceType() == INT_MAX) ? Qt::Unchecked : Qt::Checked); varForce->setCurrentIndex(static_cast(modified())->forceType()); varDirection->setCurrentIndex(static_cast(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(modified())->setHmType(hmType); -} - -void TileUI::on_varHMUnder_activated(const int hmUnder) -{ - static_cast(modified())->setUnder(varHMUnder->itemData(hmUnder, Qt::UserRole).toInt()); -} - void TileUI::on_boxForces_toggled(const bool forces) { if (!forces) -- cgit