From 46a3776736896c26aafa64f497d42a0ecded366e Mon Sep 17 00:00:00 2001 From: Dabomstew Date: Fri, 4 Mar 2016 13:34:14 +1300 Subject: [PATCH] GUI overhauls - scrolling mode, handle resize better, infinite tooltips. Also bump to 1.7.0b for impending release. --- readme.txt | 2 +- src/com/dabomstew/pkrandom/Constants.java | 2 +- .../dabomstew/pkrandom/gui/Bundle.properties | 55 +++++---- .../dabomstew/pkrandom/gui/RandomizerGUI.form | 36 +++--- .../dabomstew/pkrandom/gui/RandomizerGUI.java | 108 +++++++++++------- 5 files changed, 123 insertions(+), 80 deletions(-) diff --git a/readme.txt b/readme.txt index 510a46424..c8336177e 100755 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -Universal Pokemon Randomizer 1.7.0a +Universal Pokemon Randomizer 1.7.0b by Dabomstew, 2012-16 Homepage: http://pokehacks.dabomstew.com/randomizer/index.php diff --git a/src/com/dabomstew/pkrandom/Constants.java b/src/com/dabomstew/pkrandom/Constants.java index ab8ae3140..4d8534254 100644 --- a/src/com/dabomstew/pkrandom/Constants.java +++ b/src/com/dabomstew/pkrandom/Constants.java @@ -6,7 +6,7 @@ public class Constants { public static final String AUTOUPDATE_URL = "http://pokehacks.dabomstew.com/randomizer/autoupdate/"; public static final String WEBSITE_URL = "http://pokehacks.dabomstew.com/randomizer/"; - public static final int UPDATE_VERSION = 1701; + public static final int UPDATE_VERSION = 1702; public static final String ROOT_PATH = getRootPath(); private static String getRootPath() { diff --git a/src/com/dabomstew/pkrandom/gui/Bundle.properties b/src/com/dabomstew/pkrandom/gui/Bundle.properties index 838b234fa..bea2499ce 100755 --- a/src/com/dabomstew/pkrandom/gui/Bundle.properties +++ b/src/com/dabomstew/pkrandom/gui/Bundle.properties @@ -211,7 +211,6 @@ RandomizerGUI.codeTweaksBtn.textWithActive=Code Tweaks (%d) RandomizerGUI.pokeLimitCB.text= RandomizerGUI.pokeLimitBtn.text=Limit Pokemon RandomizerGUI.pokeLimitCB.toolTipText=Select this to allow yourself to limit the Pokemon used by the randomization.
If this box isn't checked all Pokemon will be allowed! -RandomizerGUI.updateSettingsButton.text=Update Settings RandomizerGUI.toggleAutoUpdatesMenuItem.text=Toggle AutoUpdate RandomizerGUI.manualUpdateMenuItem.text=Check for Update Now RandomizerGUI.disableAutoUpdate=Disable Auto Update @@ -268,7 +267,7 @@ RandomizerGUI.tmHmTutorPanel.TabConstraints.tabTitle=TM/HMs & Tutors RandomizerGUI.startersInnerPanel.TabConstraints.tabTitle=Starters, Statics & Trades RandomizerGUI.trainersInnerPanel.TabConstraints.tabTitle=Trainer Pokemon RandomizerGUI.fieldItemsInnerPanel.TabConstraints.tabTitle=Field Items -RandomizerGUI.versionLabel.text=Randomizer Version 1.7.0a +RandomizerGUI.versionLabel.text=Randomizer Version 1.7.0b RandomizerGUI.websiteLinkLabel.text=http://pokehacks.dabomstew.com/randomizer RandomizerGUI.peUnchangedRB.text=Unchanged RandomizerGUI.peRandomRB.text=Randomize @@ -287,6 +286,35 @@ RandomizerGUI.wildsInnerPanel.TabConstraints.tabTitle=Wild Pokemon RandomizerGUI.miscTweaksInnerPanel.TabConstraints.tabTitle=Misc Tweaks RandomizerGUI.miscTweaksPanel.border.title=Misc. Tweaks RandomizerGUI.mtNoneAvailableLabel.text=There are no tweaks available for the currently loaded game. +RandomizerGUI.gameMascotLabel.text= +RandomizerGUI.thcFullRB.toolTipText=Select this option to allow every Pokemon to learn every TM/HM.
This can be fun to mess around with, but it might make the game too easy. +RandomizerGUI.thcFullRB.text=Full compatibility +RandomizerGUI.thcRandomTotalRB.toolTipText=Randomise the TMs and HMs that each Pokemon can learn.
Each TM or HM will have a 50% chance of being learnable regardless of type. +RandomizerGUI.thcRandomTotalRB.text=Random (completely) +RandomizerGUI.thcRandomTypeRB.toolTipText=Randomise the TMs and HMs that each Pokemon can learn.
Each TM or HM will have:
A 90% chance of being learnable if the Pokemon has it as (one of) its type(s).
A 50% chance of being learnable if the move is Normal and the Pokemon isn't.
A 25% chance otherwise. +RandomizerGUI.thcRandomTypeRB.text=Random (prefer same type) +RandomizerGUI.thcUnchangedRB.toolTipText=Every Pokemon will be able to learn the same TMs that it could before.
Note that this applies even if you change the TM moves, which could lead to some odd combinations. +RandomizerGUI.thcUnchangedRB.text=Unchanged +RandomizerGUI.tmHmCompatPanel.border.title=TM/HM Compatibility +RandomizerGUI.tmFullHMCompatCB.toolTipText=If you select this option, then every Pokemon will learn every HM, regardless of any other options you check. +RandomizerGUI.tmFullHMCompatCB.text=Full HM Compatibility? +RandomizerGUI.tmKeepFieldMovesCB.toolTipText=If you select this, TMs that contain field-use moves will be left alone.
This includes things like Dig & Teleport, but not healing moves (Softboiled). +RandomizerGUI.tmKeepFieldMovesCB.text=Keep field move TMs? +RandomizerGUI.tmLearningSanityCB.toolTipText=If you select this option, then Pokemon will be guaranteed to learn TMs of moves that they learn by levelup.
Otherwise, move compatibility will be left alone or decided randomly, depending on your other choices. +RandomizerGUI.tmLearningSanityCB.text=TM/Levelup Move Sanity? +RandomizerGUI.tmmRandomRB.toolTipText=Give each TM a new move.
HM moves are not affected, nor can they be selected to be put in TMs.
Each TM will still be unique.
If Metronome Only Mode is selected, all TMs are changed to Metronome and this setting has no effect. +RandomizerGUI.tmmRandomRB.text=Random +RandomizerGUI.tmmUnchangedRB.toolTipText=Leave the moves in TMs as they are.
If Metronome Only Mode is selected, all TMs are changed to Metronome and this setting has no effect. +RandomizerGUI.tmmUnchangedRB.text=Unchanged +RandomizerGUI.tmMovesPanel.border.title=TM Moves +RandomizerGUI.tmhmsPanel.border.title=TMs & HMs +RandomizerGUI.toggleScrollPaneMenuItem.text=Toggle ScrollView +RandomizerGUI.settingsButton.text=Settings +RandomizerGUI.changeToTabbedPane=Change to Tabbed Display Mode +RandomizerGUI.changeToScrollPane=Change to Scrolling Display Mode +RandomizerGUI.displayModeChangeDialog.text=Are you sure you wish to switch display modes?\nIn order to apply this setting, the randomizer will have to close first.\nIf you're in the middle of a randomization, finish it before saying Yes. +RandomizerGUI.displayModeChangeDialog.title=Alert +RandomizerGUI.displayModeChanged=Display mode changed.\nThe randomizer will now automatically close.\nWhen you re-open it, your display mode change will be applied. GenerationLimitDialog.includePokemonHeader.text=Include Pokemon from: GenerationLimitDialog.relatedPokemonHeader.text=... and related Pokemon from: GenerationLimitDialog.gen1CB.text=Generation 1 @@ -353,25 +381,4 @@ CodeTweaks.lowerCaseNames.toolTipText=If this is selected, all Pokemon nam CodeTweaks.lowerCaseNames.name=Lower Case Pokemon Names CodeTweaks.catchingTutorial.toolTipText=Selecting this option will randomize the Pokemon participating in the game's catching tutorial. CodeTweaks.catchingTutorial.name=Randomize Catching Tutorial -RandomizerGUI.gameMascotLabel.text= -RandomizerGUI.thcFullRB.toolTipText=Select this option to allow every Pokemon to learn every TM/HM.
This can be fun to mess around with, but it might make the game too easy. -RandomizerGUI.thcFullRB.text=Full compatibility -RandomizerGUI.thcRandomTotalRB.toolTipText=Randomise the TMs and HMs that each Pokemon can learn.
Each TM or HM will have a 50% chance of being learnable regardless of type. -RandomizerGUI.thcRandomTotalRB.text=Random (completely) -RandomizerGUI.thcRandomTypeRB.toolTipText=Randomise the TMs and HMs that each Pokemon can learn.
Each TM or HM will have:
A 90% chance of being learnable if the Pokemon has it as (one of) its type(s).
A 50% chance of being learnable if the move is Normal and the Pokemon isn't.
A 25% chance otherwise. -RandomizerGUI.thcRandomTypeRB.text=Random (prefer same type) -RandomizerGUI.thcUnchangedRB.toolTipText=Every Pokemon will be able to learn the same TMs that it could before.
Note that this applies even if you change the TM moves, which could lead to some odd combinations. -RandomizerGUI.thcUnchangedRB.text=Unchanged -RandomizerGUI.tmHmCompatPanel.border.title=TM/HM Compatibility -RandomizerGUI.tmFullHMCompatCB.toolTipText=If you select this option, then every Pokemon will learn every HM, regardless of any other options you check. -RandomizerGUI.tmFullHMCompatCB.text=Full HM Compatibility? -RandomizerGUI.tmKeepFieldMovesCB.toolTipText=If you select this, TMs that contain field-use moves will be left alone.
This includes things like Dig & Teleport, but not healing moves (Softboiled). -RandomizerGUI.tmKeepFieldMovesCB.text=Keep field move TMs? -RandomizerGUI.tmLearningSanityCB.toolTipText=If you select this option, then Pokemon will be guaranteed to learn TMs of moves that they learn by levelup.
Otherwise, move compatibility will be left alone or decided randomly, depending on your other choices. -RandomizerGUI.tmLearningSanityCB.text=TM/Levelup Move Sanity? -RandomizerGUI.tmmRandomRB.toolTipText=Give each TM a new move.
HM moves are not affected, nor can they be selected to be put in TMs.
Each TM will still be unique.
If Metronome Only Mode is selected, all TMs are changed to Metronome and this setting has no effect. -RandomizerGUI.tmmRandomRB.text=Random -RandomizerGUI.tmmUnchangedRB.toolTipText=Leave the moves in TMs as they are.
If Metronome Only Mode is selected, all TMs are changed to Metronome and this setting has no effect. -RandomizerGUI.tmmUnchangedRB.text=Unchanged -RandomizerGUI.tmMovesPanel.border.title=TM Moves -RandomizerGUI.tmhmsPanel.border.title=TMs & HMs + diff --git a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form index b168ff76f..9374a22c3 100755 --- a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form +++ b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form @@ -91,6 +91,16 @@ + + + + + + + + + + @@ -101,7 +111,6 @@ - @@ -138,24 +147,21 @@ - + - + - + - - - - + @@ -164,7 +170,7 @@ - + @@ -175,7 +181,7 @@ - + @@ -192,8 +198,8 @@ - - + + @@ -412,14 +418,14 @@ - + - + - + diff --git a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java index 620c3cf90..caa396777 100755 --- a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java +++ b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java @@ -62,6 +62,7 @@ import javax.swing.JScrollPane; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.SwingUtilities; +import javax.swing.ToolTipManager; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import javax.xml.bind.DatatypeConverter; @@ -107,6 +108,7 @@ public class RandomizerGUI extends javax.swing.JFrame { // Settings private boolean autoUpdateEnabled; private boolean haveCheckedCustomNames; + private boolean useScrollPaneMode; private ImageIcon emptyIcon = new ImageIcon(getClass().getResource("/com/dabomstew/pkrandom/gui/emptyIcon.png")); java.util.ResourceBundle bundle; @@ -132,7 +134,6 @@ public static void main(String args[]) { javax.swing.UIManager.setLookAndFeel(lafName); onWindowsNativeLAF = true; } - System.out.println(lafName); } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(RandomizerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); @@ -164,23 +165,28 @@ public void run() { * @param autoupdate */ public RandomizerGUI(boolean autoupdate, boolean onWindowsLAF) { - + ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE); bundle = java.util.ResourceBundle.getBundle("com/dabomstew/pkrandom/gui/Bundle"); // NOI18N testForRequiredConfigs(); checkHandlers = new RomHandler.Factory[] { new Gen1RomHandler.Factory(), new Gen2RomHandler.Factory(), new Gen3RomHandler.Factory(), new Gen4RomHandler.Factory(), new Gen5RomHandler.Factory() }; - initComponents(); - initTweaksPanel(); - guiCleanup(onWindowsLAF); - noTweaksLayout = miscTweaksPanel.getLayout(); - initialiseState(); autoUpdateEnabled = true; haveCheckedCustomNames = false; + useScrollPaneMode = !onWindowsLAF; attemptReadConfig(); if (!autoupdate) { // override autoupdate autoUpdateEnabled = false; } + initComponents(); + initTweaksPanel(); + guiCleanup(); + if (useScrollPaneMode) { + scrollPaneSetup(); + } + noTweaksLayout = miscTweaksPanel.getLayout(); + initialiseState(); + boolean canWrite = attemptWriteConfig(); if (!canWrite) { JOptionPane.showMessageDialog(null, bundle.getString("RandomizerGUI.cantWriteConfigFile")); @@ -194,7 +200,7 @@ public RandomizerGUI(boolean autoupdate, boolean onWindowsLAF) { } } - private void guiCleanup(boolean onWindowsLAF) { + private void guiCleanup() { // All systems: test for font size and adjust if required Font f = pokeLimitCB.getFont(); if (f == null || !f.getFontName().equalsIgnoreCase("tahoma") || f.getSize() != 11) { @@ -206,15 +212,9 @@ private void guiCleanup(boolean onWindowsLAF) { cb.setFont(regularFont); } } - - // Non-Windows scrollbar mode? - // TODO make this an option, instead - if (!onWindowsLAF) { - scrollPaneMode(); - } } - private void scrollPaneMode() { + private void scrollPaneSetup() { /* @formatter:off */ JScrollPane optionsScrollPane = new JScrollPane(); optionsScrollPane.getVerticalScrollBar().setUnitIncrement(16); @@ -414,7 +414,6 @@ private void scrollPaneMode() { optionsScrollPane.setViewportView(optionsContainerPanel); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -440,7 +439,7 @@ private void scrollPaneMode() { .addComponent(openROMButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(saveROMButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(usePresetsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(updateSettingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(settingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(versionLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -450,7 +449,7 @@ private void scrollPaneMode() { layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(generalOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(gameMascotLabel) @@ -461,7 +460,7 @@ private void scrollPaneMode() { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(usePresetsButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(updateSettingsButton)) + .addComponent(settingsButton)) .addGroup(layout.createSequentialGroup() .addComponent(romInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) @@ -473,10 +472,11 @@ private void scrollPaneMode() { .addComponent(versionLabel) .addComponent(websiteLinkLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(optionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 457, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(22, 22, 22)) + .addComponent(optionsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 457, Short.MAX_VALUE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE)) ); getContentPane().remove(randomizerOptionsPane); + getContentPane().setLayout(layout); /* @formatter:on */ } @@ -630,6 +630,8 @@ private void attemptReadConfig() { autoUpdateEnabled = Boolean.parseBoolean(tokens[1].trim()); } else if (key.equalsIgnoreCase("checkedcustomnames")) { haveCheckedCustomNames = Boolean.parseBoolean(tokens[1].trim()); + } else if (key.equalsIgnoreCase("usescrollpane")) { + useScrollPaneMode = Boolean.parseBoolean(tokens[1].trim()); } } } @@ -650,6 +652,7 @@ private boolean attemptWriteConfig() { PrintStream ps = new PrintStream(new FileOutputStream(fh), true, "UTF-8"); ps.println("autoupdate=" + autoUpdateEnabled); ps.println("checkedcustomnames=" + haveCheckedCustomNames); + ps.println("usescrollpane=" + useScrollPaneMode); ps.close(); return true; } catch (IOException e) { @@ -2019,13 +2022,19 @@ public void noUpdateFound() { // actions - private void updateSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_updateSettingsButtonActionPerformed + private void settingsButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_updateSettingsButtonActionPerformed if (autoUpdateEnabled) { toggleAutoUpdatesMenuItem.setText(bundle.getString("RandomizerGUI.disableAutoUpdate")); } else { toggleAutoUpdatesMenuItem.setText(bundle.getString("RandomizerGUI.enableAutoUpdate")); } - updateSettingsMenu.show(updateSettingsButton, 0, updateSettingsButton.getHeight()); + + if (useScrollPaneMode) { + toggleScrollPaneMenuItem.setText(bundle.getString("RandomizerGUI.changeToTabbedPane")); + } else { + toggleScrollPaneMenuItem.setText(bundle.getString("RandomizerGUI.changeToScrollPane")); + } + updateSettingsMenu.show(settingsButton, 0, settingsButton.getHeight()); }// GEN-LAST:event_updateSettingsButtonActionPerformed private void toggleAutoUpdatesMenuItemActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleAutoUpdatesMenuItemActionPerformed @@ -2042,6 +2051,18 @@ private void manualUpdateMenuItemActionPerformed(java.awt.event.ActionEvent evt) new UpdateCheckThread(this, true).start(); }// GEN-LAST:event_manualUpdateMenuItemActionPerformed + private void toggleScrollPaneMenuItemActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_toggleScrollPaneMenuItemActionPerformed + int response = JOptionPane.showConfirmDialog(RandomizerGUI.this, + bundle.getString("RandomizerGUI.displayModeChangeDialog.text"), + bundle.getString("RandomizerGUI.displayModeChangeDialog.title"), JOptionPane.YES_NO_OPTION); + if (response == JOptionPane.YES_OPTION) { + useScrollPaneMode = !useScrollPaneMode; + JOptionPane.showMessageDialog(this, bundle.getString("RandomizerGUI.displayModeChanged")); + attemptWriteConfig(); + System.exit(0); + } + }// GEN-LAST:event_toggleScrollPaneMenuItemActionPerformed + private void loadQSButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_loadQSButtonActionPerformed if (this.romHandler == null) { return; @@ -2372,6 +2393,7 @@ public void approveSelection() { updateSettingsMenu = new javax.swing.JPopupMenu(); toggleAutoUpdatesMenuItem = new javax.swing.JMenuItem(); manualUpdateMenuItem = new javax.swing.JMenuItem(); + toggleScrollPaneMenuItem = new javax.swing.JMenuItem(); pokeEvolutionsButtonGroup = new javax.swing.ButtonGroup(); generalOptionsPanel = new javax.swing.JPanel(); pokeLimitCB = new javax.swing.JCheckBox(); @@ -2387,7 +2409,7 @@ public void approveSelection() { usePresetsButton = new javax.swing.JButton(); loadQSButton = new javax.swing.JButton(); saveQSButton = new javax.swing.JButton(); - updateSettingsButton = new javax.swing.JButton(); + settingsButton = new javax.swing.JButton(); randomizerOptionsPane = new javax.swing.JTabbedPane(); pokeTraitsPanel = new javax.swing.JPanel(); pokemonTypesPanel = new javax.swing.JPanel(); @@ -2544,9 +2566,16 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); updateSettingsMenu.add(manualUpdateMenuItem); + toggleScrollPaneMenuItem.setText(bundle.getString("RandomizerGUI.toggleScrollPaneMenuItem.text")); // NOI18N + toggleScrollPaneMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + toggleScrollPaneMenuItemActionPerformed(evt); + } + }); + updateSettingsMenu.add(toggleScrollPaneMenuItem); + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle(bundle.getString("RandomizerGUI.title")); // NOI18N - setResizable(false); generalOptionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, bundle.getString("RandomizerGUI.generalOptionsPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N @@ -2669,10 +2698,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - updateSettingsButton.setText(bundle.getString("RandomizerGUI.updateSettingsButton.text")); // NOI18N - updateSettingsButton.addActionListener(new java.awt.event.ActionListener() { + settingsButton.setText(bundle.getString("RandomizerGUI.settingsButton.text")); // NOI18N + settingsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - updateSettingsButtonActionPerformed(evt); + settingsButtonActionPerformed(evt); } }); @@ -4146,26 +4175,24 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addComponent(romInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(28, 28, 28) .addComponent(gameMascotLabel) - .addGap(37, 37, 37) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(openROMButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(saveROMButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(usePresetsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(updateSettingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(settingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, 0)) .addGroup(layout.createSequentialGroup() .addComponent(versionLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(websiteLinkLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(randomizerOptionsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 759, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(randomizerOptionsPane, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(generalOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(gameMascotLabel) @@ -4176,7 +4203,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(usePresetsButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(updateSettingsButton)) + .addComponent(settingsButton)) .addGroup(layout.createSequentialGroup() .addComponent(romInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) @@ -4188,13 +4215,15 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addComponent(versionLabel) .addComponent(websiteLinkLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(randomizerOptionsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 457, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(22, 22, 22)) + .addComponent(randomizerOptionsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 457, Short.MAX_VALUE) + .addContainerGap()) ); pack(); }// //GEN-END:initComponents + + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel abilitiesPanel; private javax.swing.JPanel baseStatsPanel; @@ -4293,6 +4322,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { private javax.swing.JFileChooser romSaveChooser; private javax.swing.JButton saveQSButton; private javax.swing.JButton saveROMButton; + private javax.swing.JButton settingsButton; private javax.swing.JComboBox spCustomPoke1Chooser; private javax.swing.JComboBox spCustomPoke2Chooser; private javax.swing.JComboBox spCustomPoke3Chooser; @@ -4328,6 +4358,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { private javax.swing.JRadioButton tmmUnchangedRB; private javax.swing.JCheckBox tnRandomizeCB; private javax.swing.JMenuItem toggleAutoUpdatesMenuItem; + private javax.swing.JMenuItem toggleScrollPaneMenuItem; private javax.swing.JCheckBox tpNoEarlyShedinjaCB; private javax.swing.JCheckBox tpNoLegendariesCB; private javax.swing.JCheckBox tpPowerLevelsCB; @@ -4339,7 +4370,6 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { private javax.swing.ButtonGroup trainerPokesButtonGroup; private javax.swing.JPanel trainersInnerPanel; private javax.swing.JPanel trainersPokemonPanel; - private javax.swing.JButton updateSettingsButton; private javax.swing.JPopupMenu updateSettingsMenu; private javax.swing.JButton usePresetsButton; private javax.swing.JLabel versionLabel;