fix premature image swap, fix auto-download not appearing on fresh install
This commit is contained in:
parent
ba7af2e90b
commit
f863029296
|
@ -32,11 +32,11 @@
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-16777216"/>
|
<background color="-2271221"/>
|
||||||
<editable value="false"/>
|
<editable value="false"/>
|
||||||
<focusable value="false"/>
|
<focusable value="false"/>
|
||||||
<font name="Luxi Mono" size="10"/>
|
<font name="Exo 2"/>
|
||||||
<foreground color="-5180417"/>
|
<foreground color="-1"/>
|
||||||
<horizontalAlignment value="0"/>
|
<horizontalAlignment value="0"/>
|
||||||
<text value="Do you think we should appeal to the alien authorities?"/>
|
<text value="Do you think we should appeal to the alien authorities?"/>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
|
@ -157,25 +157,16 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
if (actionEvent.getSource() == contBtn) {
|
if (actionEvent.getSource() == contBtn) {
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case INTRO:
|
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
|
if (!new File(Main.inpath + "psp2psarc.exe").exists()) { // we may have been here before // nag
|
||||||
frame.setEnabled(false);
|
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);
|
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) {
|
if (result == JOptionPane.YES_OPTION) {
|
||||||
|
sdkInstalled = true;
|
||||||
Thread downloaderPopupThread = new Thread(new Runnable() {
|
Thread downloaderPopupThread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Main.downloadDependenciesBeforeSetVisible(frame);
|
Main.downloadDependenciesBeforeSetVisible(frame);
|
||||||
frame.setEnabled(true);
|
frame.setEnabled(true);
|
||||||
sdkInstalled = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
downloaderPopupThread.start();
|
downloaderPopupThread.start();
|
||||||
|
@ -186,6 +177,15 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
sdkInstalled = true;
|
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.setEnabled(false);
|
||||||
contBtn.setBackground(new Color(102, 74, 58)); //brown
|
contBtn.setBackground(new Color(102, 74, 58)); //brown
|
||||||
inputContainer.setVisible(true);
|
inputContainer.setVisible(true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user