From f86302929650f4729f99aec2f7de1243f3fedd7f Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Fri, 12 Jul 2024 14:32:38 -0500 Subject: [PATCH] fix premature image swap, fix auto-download not appearing on fresh install --- firestar/src/main/java/Rowlf.form | 6 +++--- firestar/src/main/java/WilkinsCoffee.java | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/firestar/src/main/java/Rowlf.form b/firestar/src/main/java/Rowlf.form index ec2202c..48fea7b 100644 --- a/firestar/src/main/java/Rowlf.form +++ b/firestar/src/main/java/Rowlf.form @@ -32,11 +32,11 @@ - + - - + + diff --git a/firestar/src/main/java/WilkinsCoffee.java b/firestar/src/main/java/WilkinsCoffee.java index d52e017..6e5e6f8 100644 --- a/firestar/src/main/java/WilkinsCoffee.java +++ b/firestar/src/main/java/WilkinsCoffee.java @@ -157,25 +157,16 @@ public class WilkinsCoffee implements ActionListener { if (actionEvent.getSource() == contBtn) { switch (page) { case INTRO: - page = Pages.PSARC; - try { - logo = ImageIO.read(Main.class.getResourceAsStream("/setupIconPSARC.png")).getScaledInstance(96, 96, Image.SCALE_SMOOTH); - picLabel.setIcon(new ImageIcon(logo));picLabel.setText(""); - } catch (IOException e) { - System.out.println("ERROR: Missing resource in Wilkins. Page will be without images."); - picLabel.setText(""); - } - if (!new File(Main.inpath + "psp2psarc.exe").exists()) { // we may have been here before // nag frame.setEnabled(false); int result = JOptionPane.showConfirmDialog(frame, "Firestar needs to download additional software to function. Setup is automatic and will only take a few minutes.\nIf you select NO, you will have to download additional dependencies later on.\n\nContinue?", "Firestar Setup", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (result == JOptionPane.YES_OPTION) { + sdkInstalled = true; Thread downloaderPopupThread = new Thread(new Runnable() { @Override public void run() { Main.downloadDependenciesBeforeSetVisible(frame); frame.setEnabled(true); - sdkInstalled = true; } }); downloaderPopupThread.start(); @@ -186,6 +177,15 @@ public class WilkinsCoffee implements ActionListener { sdkInstalled = true; } + page = Pages.PSARC; + try { + logo = ImageIO.read(Main.class.getResourceAsStream("/setupIconPSARC.png")).getScaledInstance(96, 96, Image.SCALE_SMOOTH); + picLabel.setIcon(new ImageIcon(logo));picLabel.setText(""); + } catch (IOException e) { + System.out.println("ERROR: Missing resource in Wilkins. Page will be without images."); + picLabel.setText(""); + } + contBtn.setEnabled(false); contBtn.setBackground(new Color(102, 74, 58)); //brown inputContainer.setVisible(true);