From b32d5c884de6d9a1792525e112011491651ed32f Mon Sep 17 00:00:00 2001 From: Ajarmar Date: Sat, 28 Dec 2019 23:25:50 +0100 Subject: Hide GUI elements for musketeers, shaking grass, shop items if they are not available for the chosen game --- src/com/dabomstew/pkrandom/gui/Bundle.properties | 2 +- src/com/dabomstew/pkrandom/gui/RandomizerGUI.java | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'src/com') diff --git a/src/com/dabomstew/pkrandom/gui/Bundle.properties b/src/com/dabomstew/pkrandom/gui/Bundle.properties index 19f5a2c..47cecb7 100755 --- a/src/com/dabomstew/pkrandom/gui/Bundle.properties +++ b/src/com/dabomstew/pkrandom/gui/Bundle.properties @@ -189,7 +189,7 @@ RandomizerGUI.pmsMetronomeOnlyRB.text=Metronome Only Mode RandomizerGUI.pmsMetronomeOnlyRB.toolTipText=Where possible, every Pok\u00e9mon in the entire game will have Metronome as its only move,
with the PP boosted to 40 to make it possible to complete fights without always using Struggle.
Does not currently apply to non-standard battles such as the Battle Tower/Frontier or the PWT. RandomizerGUI.inGameTradesPanel.border.title=In-Game Trades RandomizerGUI.fieldItemsPanel.border.title=Field Items -RandomizerGUI.shopItemsPanel.border.title=Non-Main Shop Items (Gen 5 Only) +RandomizerGUI.shopItemsPanel.border.title=Non-Main Shop Items RandomizerGUI.igtUnchangedRB.text=Unchanged RandomizerGUI.igtUnchangedRB.toolTipText=In-game trades remain the same. RandomizerGUI.igtGivenOnlyRB.text=Randomize Given Pokemon Only diff --git a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java index 0470656..bb81ed3 100755 --- a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java +++ b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java @@ -1218,14 +1218,24 @@ public class RandomizerGUI extends javax.swing.JFrame { } this.wpShakingGrassCB.setSelected(false); this.wpShakingGrassCB.setEnabled(false); - this.wpShakingGrassCB.setVisible(true); + if (romHandler.generationOfPokemon() < 5) { + this.wpShakingGrassCB.setVisible(false); + } else { + this.wpShakingGrassCB.setVisible(true); + } this.stpUnchangedRB.setEnabled(true); if (this.romHandler.canChangeStaticPokemon()) { this.stpRandomL4LRB.setEnabled(true); this.stpRandomTotalRB.setEnabled(true); this.stpRandomPower.setEnabled(true); - this.stpLimitMusketeers.setEnabled(true); + if (romHandler.generationOfPokemon() < 5) { + this.stpLimitMusketeers.setVisible(false); + this.stpLimitMusketeers.setEnabled(false); + } else { + this.stpLimitMusketeers.setVisible(true); + this.stpLimitMusketeers.setEnabled(true); + } this.stpLimit600.setEnabled(true); } @@ -1270,6 +1280,12 @@ public class RandomizerGUI extends javax.swing.JFrame { this.fiBanBadCB.setEnabled(false); this.fiBanBadCB.setSelected(false); + if (romHandler.generationOfPokemon() < 5) { + this.shopItemsPanel.setVisible(false); + } else { + this.shopItemsPanel.setVisible(true); + } + this.shUnchangedRB.setEnabled(true); this.shShuffleRB.setEnabled(true); this.shRandomRB.setEnabled(true); -- cgit v1.2.3