Skip to content

Commit

Permalink
V1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
valerian2 committed Jan 28, 2024
1 parent d5c3980 commit bb1b1de
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
47 changes: 25 additions & 22 deletions .idea/artifacts/Apocalyptic_Survival_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions src/main/java/fr/amiriastudio/apocalypticlauncher/Panel.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package fr.amiriastudio.apocalypticlauncher;

import fr.litarvan.openauth.microsoft.MicrosoftAuthenticationException;
import fr.theshark34.openlauncherlib.util.ramselector.RamSelector;
import fr.theshark34.swinger.Swinger;
import fr.theshark34.swinger.event.SwingerEvent;
import fr.theshark34.swinger.event.SwingerEventListener;
import fr.theshark34.swinger.textured.STexturedButton;
Expand All @@ -12,7 +10,6 @@

import javax.swing.*;
import java.awt.*;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand All @@ -28,6 +25,7 @@ public class Panel extends JPanel implements SwingerEventListener {
private STexturedButton incorrect_version = new STexturedButton(getBufferedImage("launcher_apo_incorrect_version.png"), getBufferedImage("launcher_apo_incorrect_version.png"));
private STexturedButton quit = new STexturedButton(getBufferedImage("launcher_apo_quit1.png"), getBufferedImage("launcher_apo_quit2.png"));
private STexturedButton ram = new STexturedButton(getBufferedImage("launcher_apo_ram1.png"), getBufferedImage("launcher_apo_ram2.png"));
private STexturedButton launching = new STexturedButton(getBufferedImage("launcher_apo_launching.png"), getBufferedImage("launcher_apo_launching.png"));
private RamSelector ramSelector = new RamSelector(Frame.getRamFile());
public Panel() throws IOException {
String launcher_version = "1.2.0";
Expand All @@ -40,6 +38,12 @@ public Panel() throws IOException {
incorrect_version.addEventListener(this);
this.add(incorrect_version);

launching.setBounds(300, 150);
launching.setLocation(485, 307);
launching.addEventListener(this);
this.add(launching);
launching.setVisible(false);

play1.setBounds(200, 91);
play1.setLocation(540, 507);
play1.addEventListener(this);
Expand Down Expand Up @@ -97,7 +101,8 @@ public void onEvent(SwingerEvent swingerEvent) {
System.exit(0);
} else if (swingerEvent.getSource() == play1) {
ramSelector.save();
this.play1.setVisible(false);
play1.setVisible(false);
launching.setVisible(true);

new Thread(() -> {
try {
Expand All @@ -109,7 +114,6 @@ public void onEvent(SwingerEvent swingerEvent) {
Launcher.getReporter().catchError(e, "Impossible de lancer le launcher");
}
}).start();
this.play1.setVisible(true);
} else if (swingerEvent.getSource() == ram) {
ramSelector.display();
}
Expand Down

0 comments on commit bb1b1de

Please sign in to comment.