summaryrefslogtreecommitdiffstats
path: root/pokemodr/TileUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/TileUI.cpp')
-rw-r--r--pokemodr/TileUI.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/pokemodr/TileUI.cpp b/pokemodr/TileUI.cpp
index 5e747675..fe8e4c58 100644
--- a/pokemodr/TileUI.cpp
+++ b/pokemodr/TileUI.cpp
@@ -28,7 +28,6 @@
#include <BugCatcher.h>
#include <Exception.h>
#include <ImageCache.h>
-#include <Ref.h>
#include <Pokemod.h>
@@ -44,8 +43,8 @@ TileUI::TileUI(Tile* t, QWidget* parent) :
QMetaObject::connectSlotsByName(this);
setObjects(tile, tile_mod);
connect(this, SIGNAL(changed(bool)), boxButtons, SLOT(setDisabled(bool)));
- varAccessibility->addItems(DirectionStr.mid(0, 4));
- varHMType->addItems(HMStr);
+ varAccessibility->addItems(Pokemod::DirectionStr.mid(0, Pokemod::D_End));
+ varHMType->addItems(Pokemod::HMStr);
for (int i = 0; i < tile->getPokemod()->getTileCount(); ++i)
{
const Tile* tl = tile->getPokemod()->getTile(i);
@@ -56,7 +55,7 @@ TileUI::TileUI(Tile* t, QWidget* parent) :
}
}
varForce->addItems(Tile::ForceStr);
- varDirection->addItems(DirectionStr.mid(0, 4));
+ varDirection->addItems(Pokemod::DirectionStr.mid(0, Pokemod::D_End));
setGui();
}
@@ -76,7 +75,7 @@ void TileUI::setGui()
{
BugCatcher::report(e);
}
- for (unsigned i = 0; i < D_End; ++i)
+ for (int i = 0; i < varAccessibility->count(); ++i)
varAccessibility->item(i)->setSelected(tile_mod->getFrom(i));
varWildNum->setValue(tile_mod->getWildChance().getNum());
varWildDenom->setValue(tile_mod->getWildChance().getDenom());
@@ -85,7 +84,7 @@ void TileUI::setGui()
boxHMs->setChecked((tile_mod->getHMType() == -1) ? Qt::Unchecked : Qt::Checked);
varHMType->setCurrentIndex(tile_mod->getHMType());
varHMUnder->setCurrentIndex(varHMUnder->findData(tile_mod->getUnder()));
- varHMUnder->setEnabled((tile_mod->getHMType() == HM_Whirlpool) || (tile_mod->getHMType() == HM_Cut) || (tile_mod->getHMType() == HM_RockSmash));
+ varHMUnder->setEnabled((tile_mod->getHMType() == Pokemod::HM_Whirlpool) || (tile_mod->getHMType() == Pokemod::HM_Cut) || (tile_mod->getHMType() == Pokemod::HM_RockSmash));
boxForces->setChecked((tile_mod->getForceType() == -1) ? Qt::Unchecked : Qt::Checked);
varForce->setCurrentIndex(tile_mod->getForceType());
varDirection->setCurrentIndex(tile_mod->getForceDirection());