Skip to content

Commit

Permalink
Add HA filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Admiral-Fish committed Mar 9, 2021
1 parent 30de903 commit 04bb0d9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Forms/Controls/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,8 @@ void Filter::setGenderRatio(u8 genderRatio)
{
ui->comboBoxGenderRatio->setCurrentIndex(ui->comboBoxGenderRatio->findData(genderRatio));
}

void Filter::enableHiddenAbility()
{
ui->comboBoxAbility->addItem("H", 2);
}
1 change: 1 addition & 0 deletions Source/Forms/Controls/Filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Filter : public QWidget
bool getDisableFilters();
void disableControls(u16 control);
void setGenderRatio(u8 genderRatio);
void enableHiddenAbility();

private:
Ui::Filter *ui;
Expand Down
3 changes: 3 additions & 0 deletions Source/Forms/Gen5/DreamRadar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ void DreamRadar::setupModels()
ui->comboBoxSearcherSpecies5->addItem(tr("None"), 0);
ui->comboBoxSearcherSpecies6->addItem(tr("None"), 0);

ui->filterGenerator->enableHiddenAbility();
ui->filterSearcher->enableHiddenAbility();

std::vector<u16> species
= { 641, 642, 645, 483, 484, 487, 249, 250, 79, 120, 137, 163, 174, 175, 213, 238, 280, 333, 425, 436, 442, 447, 479, 517, 561 };
std::vector<std::string> names = Translator::getSpecies(species);
Expand Down
3 changes: 3 additions & 0 deletions Source/Forms/Gen5/Eggs5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ void Eggs5::setupModels()
ui->eggSettingsGenerator->setup(static_cast<Game>(Game::BW | Game::BW2));
ui->eggSettingsSearcher->setup(static_cast<Game>(Game::BW | Game::BW2));

ui->filterGenerator->enableHiddenAbility();
ui->filterSearcher->enableHiddenAbility();

QAction *outputTXTGenerator = generatorMenu->addAction(tr("Output Results to TXT"));
QAction *outputCSVGenerator = generatorMenu->addAction(tr("Output Results to CSV"));
connect(outputTXTGenerator, &QAction::triggered, [=]() { ui->tableViewGenerator->outputModel(false); });
Expand Down
3 changes: 3 additions & 0 deletions Source/Forms/Gen5/Event5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ void Event5::setupModels()
ui->filterGenerator->disableControls(Controls::EncounterSlots);
ui->filterSearcher->disableControls(Controls::EncounterSlots | Controls::DisableFilter | Controls::UseDelay);

ui->filterGenerator->enableHiddenAbility();
ui->filterSearcher->enableHiddenAbility();

std::vector<u16> species(649);
std::iota(species.begin(), species.end(), 1);
for (const std::string &specie : Translator::getSpecies(species))
Expand Down

0 comments on commit 04bb0d9

Please sign in to comment.