Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Real96 committed Sep 2, 2024
1 parent 9ba9b98 commit 5ef5d7c
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 165 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Resources/EncounterTables
53 changes: 11 additions & 42 deletions Source/Form/Gen4/Static4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Static4::Static4(QWidget *parent) : QWidget(parent), ui(new Ui::Static4)
connect(seedToTime, &QAction::triggered, this, &Static4::seedToTime);
ui->tableViewSearcher->addAction(seedToTime);

ui->comboBoxGeneratorShiny->setup({ toInt(Shiny::Never), toInt(Shiny::Random) });
ui->comboBoxSearcherShiny->setup({ toInt(Shiny::Never), toInt(Shiny::Random) });

connect(ui->pushButtonGenerate, &QPushButton::clicked, this, &Static4::generate);
connect(ui->pushButtonSearch, &QPushButton::clicked, this, &Static4::search);
connect(ui->pushButtonProfileManager, &QPushButton::clicked, this, &Static4::profileManager);
Expand Down Expand Up @@ -183,20 +186,9 @@ void Static4::generatorCategoryIndexChanged(int index)
{
if ((currentProfile->getVersion() & templates[i].getVersion()) != Game::None)
{

if (templates[i].getShiny() == Shiny::Never)
{
ui->comboBoxGeneratorPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm()))
+ " (" + tr("Shiny Locked") + ")",
QVariant::fromValue(i));
}
else
{
ui->comboBoxGeneratorPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm())),
QVariant::fromValue(i));
}
ui->comboBoxGeneratorPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm())),
QVariant::fromValue(i));
}
}
}
Expand All @@ -221,12 +213,7 @@ void Static4::generatorPokemonIndexChanged(int index)
ui->comboMenuGeneratorLead->setVisible(true);
}

if (staticTemplate->getShiny() == Shiny::Never) {
ui->checkBoxGeneratorShinyLock->setChecked(true);
}
else {
ui->checkBoxGeneratorShinyLock->setChecked(false);
}
ui->comboBoxGeneratorShiny->setCurrentIndex(ui->comboBoxGeneratorShiny->findData(toInt(staticTemplate->getShiny())));
}
}

Expand Down Expand Up @@ -322,20 +309,9 @@ void Static4::searcherCategoryIndexChanged(int index)
{
if ((currentProfile->getVersion() & templates[i].getVersion()) != Game::None)
{

if (templates[i].getShiny() == Shiny::Never)
{
ui->comboBoxSearcherPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm()))
+ " (" + tr("Shiny Locked") + ")",
QVariant::fromValue(i));
}
else
{
ui->comboBoxSearcherPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm())),
QVariant::fromValue(i));
}
ui->comboBoxSearcherPokemon->addItem(
QString::fromStdString(Translator::getSpecie(templates[i].getSpecie(), templates[i].getForm())),
QVariant::fromValue(i));
}
}
}
Expand All @@ -360,14 +336,7 @@ void Static4::searcherPokemonIndexChanged(int index)
ui->comboMenuSearcherLead->setVisible(true);
}

if (staticTemplate->getShiny() == Shiny::Never)
{
ui->checkBoxSearcherShinyLock->setChecked(true);
}
else
{
ui->checkBoxSearcherShinyLock->setChecked(false);
}
ui->comboBoxSearcherShiny->setCurrentIndex(ui->comboBoxSearcherShiny->findData(toInt(staticTemplate->getShiny())));
}
}

Expand Down
118 changes: 73 additions & 45 deletions Source/Form/Gen4/Static4.ui
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,17 @@
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="1" column="1">
<widget class="ComboBox" name="comboBoxGeneratorPokemon"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelGeneratorLevel">
<item row="1" column="0">
<widget class="QLabel" name="labelGeneratorPokemon">
<property name="text">
<string>Level</string>
<string>Pokemon</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelGeneratorPokemon">
<item row="0" column="0">
<widget class="QLabel" name="labelGeneratorCategory">
<property name="text">
<string>Pokemon</string>
<string>Category</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -232,27 +229,44 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelGeneratorLevel">
<property name="text">
<string>Level</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="ComboBox" name="comboBoxGeneratorPokemon"/>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBoxGeneratorLevel">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelGeneratorCategory">
<property name="text">
<string>Category</string>
<item row="4" column="1">
<widget class="ComboBox" name="comboBoxGeneratorShiny">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>Never</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBoxGeneratorShinyLock">
<property name="enabled">
<bool>false</bool>
</property>
<widget class="QLabel" name="labelGeneratorShiny">
<property name="text">
<string>Shiny Lock</string>
<string>Shiny</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -389,6 +403,30 @@
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_11">
<item row="1" column="1">
<widget class="ComboBox" name="comboBoxSearcherPokemon"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelSearcherPokemon">
<property name="text">
<string>Pokemon</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelSearcherLevel">
<property name="text">
<string>Level</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="ComboBox" name="comboBoxSearcherCategory">
<item>
Expand Down Expand Up @@ -433,52 +471,42 @@
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="ComboBox" name="comboBoxSearcherPokemon"/>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBoxSearcherLevel">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelSearcherLevel">
<property name="text">
<string>Level</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelSearcherCategory">
<property name="text">
<string>Category</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelSearcherPokemon">
<item row="4" column="0">
<widget class="QLabel" name="labelSearcherShiny">
<property name="text">
<string>Pokemon</string>
<string>Shiny</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBoxSearcherShinyLock">
<item row="4" column="1">
<widget class="ComboBox" name="comboBoxSearcherShiny">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Shiny Lock</string>
</property>
<item>
<property name="text">
<string>Never</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -559,7 +587,7 @@
<tabstop>comboBoxGeneratorCategory</tabstop>
<tabstop>comboBoxGeneratorPokemon</tabstop>
<tabstop>spinBoxGeneratorLevel</tabstop>
<tabstop>checkBoxGeneratorShinyLock</tabstop>
<tabstop>comboBoxGeneratorShiny</tabstop>
<tabstop>tableViewGenerator</tabstop>
<tabstop>comboMenuSearcherLead</tabstop>
<tabstop>textBoxSearcherMinDelay</tabstop>
Expand All @@ -571,7 +599,7 @@
<tabstop>comboBoxSearcherCategory</tabstop>
<tabstop>comboBoxSearcherPokemon</tabstop>
<tabstop>spinBoxSearcherLevel</tabstop>
<tabstop>checkBoxSearcherShinyLock</tabstop>
<tabstop>comboBoxSearcherShiny</tabstop>
<tabstop>tableViewSearcher</tabstop>
</tabstops>
<resources/>
Expand Down
11 changes: 0 additions & 11 deletions Source/Form/i18n/PokeFinder_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8031,22 +8031,11 @@
<source>Pokemon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.cpp" line="194"/>
<location filename="../Gen4/Static4.cpp" line="333"/>
<source>Shiny Locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Level</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Shiny Lock</source>
<translation>"unfinished"</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Delay</source>
Expand Down
11 changes: 0 additions & 11 deletions Source/Form/i18n/PokeFinder_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8038,22 +8038,11 @@
<source>Pokemon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.cpp" line="194"/>
<location filename="../Gen4/Static4.cpp" line="333"/>
<source>Shiny Locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Level</source>
<translation>Nivel</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Shiny Lock</source>
<translation>"unfinished"</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Delay</source>
Expand Down
11 changes: 0 additions & 11 deletions Source/Form/i18n/PokeFinder_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8031,22 +8031,11 @@
<source>Pokemon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.cpp" line="194"/>
<location filename="../Gen4/Static4.cpp" line="333"/>
<source>Shiny Locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Level</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Shiny Lock</source>
<translation>"unfinished"</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Delay</source>
Expand Down
11 changes: 0 additions & 11 deletions Source/Form/i18n/PokeFinder_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8031,22 +8031,11 @@
<source>Pokemon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../Gen4/Static4.cpp" line="194"/>
<location filename="../Gen4/Static4.cpp" line="333"/>
<source>Shiny Locked</source>
<translation>Cromaticità Bloccata</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Level</source>
<translation>Livello</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Shiny Lock</source>
<translation>Blocco Cromaticità</translation>
</message>
<message>
<location filename="../Gen4/Static4.ui"/>
<source>Delay</source>
Expand Down
Loading

0 comments on commit 5ef5d7c

Please sign in to comment.