diff --git a/src/com/dabomstew/pkrandom/gui/Bundle.properties b/src/com/dabomstew/pkrandom/gui/Bundle.properties index 81c07ff17..838b234fa 100755 --- a/src/com/dabomstew/pkrandom/gui/Bundle.properties +++ b/src/com/dabomstew/pkrandom/gui/Bundle.properties @@ -20,15 +20,8 @@ RandomizerGUI.spRandom2EvosRB.text=Random (basic Pokemon with 2 evolutions) RandomizerGUI.wpUseTimeCB.toolTipText=This affects games that have either seasons or morning/day/night encounter sets.
If this is checked, each of these sets will be treated as a separate "area".
So you will have to visit each place in morning/day/night, or in each season, to collect the Pokemon.
If this isn't checked, all of morning/day/night and all seasons will use the same encounter data. RandomizerGUI.wpUseTimeCB.text=Use time-based encounters? RandomizerGUI.wpNoLegendariesCB.text=Don't use legendaries? -RandomizerGUI.tmhmsPanel.border.title=TMs & HMs RandomizerGUI.stpRandomTotalRB.toolTipText=Selecting this will replace every static Pokemon encounter, gift or purchase with another random one.
In this particular mode, any Pokemon can replace any other Pokemon, so you could get a Mew in the Game Corner.
Or fight Magikarp instead of Mewtwo... RandomizerGUI.stpRandomTotalRB.text=Random (Completely) -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.tmHmCompatPanel.border.title=TM/HM Compatibility -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.pbsChangesShuffleRB.toolTipText=Shuffle each Pokemon's stats.
For example, its base Attack may be swapped with its base Special Attack, etc.
This does not make any Pokemon stronger or weaker. RandomizerGUI.pbsChangesShuffleRB.text=Shuffle RandomizerGUI.pbsChangesRandomEvosRB.toolTipText=Randomises each Pokemon's stats, as long as they fall within the original base stat total.
Evolutions of a Pokemon will follow that Pokemon's stat distribution.
This could make Pokemon stronger or weaker if they get unlucky or lucky rolls on stats they need. @@ -79,13 +72,7 @@ RandomizerGUI.ptUnchangedRB.text=Unchanged RandomizerGUI.pokemonTypesPanel.border.title=Pokemon Types RandomizerGUI.pbsChangesRandomTotalRB.toolTipText=Randomises each Pokemon's stats, as long as they fall within the original base stat total.
Evolutions of a Pokemon will be completely separate from that Pokemon, so evolving a Pokemon will make its stats drastically change.
This could make Pokemon stronger or weaker if they get unlucky or lucky rolls on stats they need. RandomizerGUI.pbsChangesRandomTotalRB.text=Random (completely) -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.openROMButton.text=Open ROM -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.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.wpUnchangedRB.toolTipText=Don't change Wild Pokemon at all. RandomizerGUI.wpUnchangedRB.text=Unchanged RandomizerGUI.wpRandomRB.toolTipText=Completely randomise Wild Pokemon in every area.
This should mean that there are many different Pokemon in each area. @@ -237,16 +224,10 @@ RandomizerGUI.pbsStandardEXPCurvesCB.text=Standardize EXP Curves RandomizerGUI.pbsStandardEXPCurvesCB.toolTipText=When this is selected, every Pokemon's EXP curve will be changed to one of the following:This will cause Pokemon to be better or worse based more on their stats/moves/type rather than the difficulty of leveling them.
WARNING: This will break trade compatibility with ROMs that don't have this option enabled. Use with caution. RandomizerGUI.pms4MovesCB.toolTipText=Check this to make sure every Pokemon gets 4 moves at level 1, instead of them keeping their original move count.
This ensures that every Pokemon you catch will have a full moveset.
This is now available for all supported games. RandomizerGUI.pms4MovesCB.text=Every Pokemon starts with 4 moves? -RandomizerGUI.tmLearningSanityCB.text=TM/Levelup Move Sanity? -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.tmKeepFieldMovesCB.text=Keep field move TMs? -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.mtLearningSanityCB.toolTipText=If you select this option, then Pokemon will be guaranteed to learn move tutors of moves that they learn by levelup.
Otherwise, move compatibility will be left alone or decided randomly, depending on your other choices. RandomizerGUI.mtLearningSanityCB.text=Tutor/Levelup Move Sanity? RandomizerGUI.mtKeepFieldMovesCB.toolTipText=If you select this, move tutors that contain field-use moves will be left alone.
This includes things like Headbutt, but not healing moves (Softboiled). RandomizerGUI.mtKeepFieldMovesCB.text=Keep field move tutors? -RandomizerGUI.thcFullRB.text=Full compatibility -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.mtcFullRB.text=Full compatibility RandomizerGUI.mtcFullRB.toolTipText=Select this option to allow every Pokemon to learn every Move Tutor move.
This can be fun to mess around with, but it might make the game too easy. RandomizerGUI.goCondenseEvosCheckBox.toolTipText=If this is checked, Pokemon that evolve at a very high level will evolve at lower levels to make them more viable for shorter playthroughs.
Specifically, every Pokemon will evolve to its final stage by level 40, and three-stage evolutions will reach their middle stage by no later than level 30.
Takes effect regardless of whether evolutions are randomized or not. @@ -287,8 +268,6 @@ 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.tmFullHMCompatCB.text=Full 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.versionLabel.text=Randomizer Version 1.7.0a RandomizerGUI.websiteLinkLabel.text=http://pokehacks.dabomstew.com/randomizer RandomizerGUI.peUnchangedRB.text=Unchanged @@ -375,3 +354,24 @@ 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 3786629f3..b168ff76f 100755 --- a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form +++ b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.form @@ -126,29 +126,24 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + + + + + @@ -157,8 +152,12 @@ + + + + - + diff --git a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java index 6f5608c8e..620c3cf90 100755 --- a/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java +++ b/src/com/dabomstew/pkrandom/gui/RandomizerGUI.java @@ -24,7 +24,10 @@ /*-- along with this program. If not, see . --*/ /*----------------------------------------------------------------------------*/ +import java.awt.Component; +import java.awt.Container; import java.awt.Desktop; +import java.awt.Font; import java.awt.Graphics; import java.awt.LayoutManager; import java.awt.image.BufferedImage; @@ -52,10 +55,15 @@ import javax.swing.GroupLayout.SequentialGroup; import javax.swing.ImageIcon; import javax.swing.JCheckBox; +import javax.swing.JComponent; import javax.swing.JFileChooser; import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.SwingUtilities; +import javax.swing.border.Border; +import javax.swing.border.TitledBorder; import javax.xml.bind.DatatypeConverter; import com.dabomstew.pkrandom.Constants; @@ -116,8 +124,15 @@ public static void main(String args[]) { } } final boolean au = autoupdate; + boolean onWindowsNativeLAF = false; try { - javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); + String lafName = javax.swing.UIManager.getSystemLookAndFeelClassName(); + // NEW: Only set Native LaF on windows. + if (lafName.equalsIgnoreCase("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) { + 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); @@ -132,10 +147,12 @@ public static void main(String args[]) { ex); } + final boolean wn = onWindowsNativeLAF; + /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new RandomizerGUI(au); + new RandomizerGUI(au, wn); } }); } @@ -146,15 +163,16 @@ public void run() { * * @param autoupdate */ - public RandomizerGUI(boolean autoupdate) { + public RandomizerGUI(boolean autoupdate, boolean onWindowsLAF) { 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(); - noTweaksLayout = miscTweaksPanel.getLayout(); initTweaksPanel(); + guiCleanup(onWindowsLAF); + noTweaksLayout = miscTweaksPanel.getLayout(); initialiseState(); autoUpdateEnabled = true; haveCheckedCustomNames = false; @@ -176,6 +194,311 @@ public RandomizerGUI(boolean autoupdate) { } } + private void guiCleanup(boolean onWindowsLAF) { + // All systems: test for font size and adjust if required + Font f = pokeLimitCB.getFont(); + if (f == null || !f.getFontName().equalsIgnoreCase("tahoma") || f.getSize() != 11) { + System.out.println("activating font face fix"); + Font regularFont = new Font("Tahoma", 0, 11); + Font boldFont = new Font("Tahoma", 1, 11); + fontFaceFix(this, regularFont, boldFont); + for (JCheckBox cb : tweakCheckboxes) { + cb.setFont(regularFont); + } + } + + // Non-Windows scrollbar mode? + // TODO make this an option, instead + if (!onWindowsLAF) { + scrollPaneMode(); + } + } + + private void scrollPaneMode() { + /* @formatter:off */ + JScrollPane optionsScrollPane = new JScrollPane(); + optionsScrollPane.getVerticalScrollBar().setUnitIncrement(16); + JPanel optionsContainerPanel = new JPanel(); + javax.swing.GroupLayout optionsContainerPanelLayout = new javax.swing.GroupLayout( + optionsContainerPanel); + optionsContainerPanel.setLayout(optionsContainerPanelLayout); + optionsContainerPanelLayout + .setHorizontalGroup(optionsContainerPanelLayout + .createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pokemonTypesPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(pokemonMovesetsPanel, + javax.swing.GroupLayout.Alignment.TRAILING, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(trainersPokemonPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(wildPokemonPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(starterPokemonPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(staticPokemonPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(tmhmsPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addGroup( + optionsContainerPanelLayout + .createSequentialGroup() + .addComponent( + baseStatsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + abilitiesPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE)) + .addComponent(moveTutorsPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(inGameTradesPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(fieldItemsPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(pokemonEvolutionsPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(moveDataPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent(miscTweaksPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + ); + optionsContainerPanelLayout + .setVerticalGroup(optionsContainerPanelLayout + .createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING) + .addGroup( + optionsContainerPanelLayout + .createSequentialGroup() + .addGroup( + optionsContainerPanelLayout + .createParallelGroup( + javax.swing.GroupLayout.Alignment.LEADING, + false) + .addComponent( + baseStatsPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent( + abilitiesPanel, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE)) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + pokemonTypesPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + pokemonEvolutionsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + starterPokemonPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + moveDataPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + pokemonMovesetsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + trainersPokemonPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + wildPokemonPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + staticPokemonPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + tmhmsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + moveTutorsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + inGameTradesPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + fieldItemsPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap( + javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent( + miscTweaksPanel, + javax.swing.GroupLayout.PREFERRED_SIZE, + javax.swing.GroupLayout.DEFAULT_SIZE, + javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap( + javax.swing.GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE))); + + optionsScrollPane.setViewportView(optionsContainerPanel); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(optionsScrollPane, + javax.swing.GroupLayout.DEFAULT_SIZE, + 747, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(generalOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(loadQSButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(saveQSButton)) + .addComponent(romInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(28, 28, 28) + .addComponent(gameMascotLabel) + .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))) + .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))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .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) + .addGroup(layout.createSequentialGroup() + .addComponent(openROMButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(saveROMButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(usePresetsButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(updateSettingsButton)) + .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) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(loadQSButton) + .addComponent(saveQSButton)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .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)) + ); + getContentPane().remove(randomizerOptionsPane); + /* @formatter:on */ + } + + private void fontFaceFix(Container root, Font font, Font boldFont) { + for (Component c : root.getComponents()) { + if (c != versionLabel) { + c.setFont(font); + } + if (c instanceof JComponent) { + JComponent jc = (JComponent) c; + Border b = jc.getBorder(); + if (b != null && b instanceof TitledBorder) { + ((TitledBorder) b).setTitleFont(boldFont); + } + } + if (c instanceof Container) { + fontFaceFix((Container) c, font, boldFont); + } + } + + } + private void initTweaksPanel() { tweakCheckboxes = new ArrayList(); int numTweaks = MiscTweak.allTweaks.size(); @@ -3813,31 +4136,31 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(generalOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(loadQSButton) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(saveQSButton)) - .addComponent(romInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(28, 28, 28) - .addComponent(gameMascotLabel) - .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))) - .addComponent(randomizerOptionsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 759, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(generalOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(loadQSButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(saveQSButton)) + .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) + .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)) .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))) - .addContainerGap(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))) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)