From 83efce8f3fd2102d104a581715bb686bd644e7af Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Fri, 12 Jul 2024 17:10:58 -0500 Subject: [PATCH] added check for updates to options --- firestar/src/main/java/Waldorf.form | 22 ++++++++++++++++++---- firestar/src/main/java/Waldorf.java | 10 ++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/firestar/src/main/java/Waldorf.form b/firestar/src/main/java/Waldorf.form index e45d888..9e94cf7 100644 --- a/firestar/src/main/java/Waldorf.form +++ b/firestar/src/main/java/Waldorf.form @@ -1,6 +1,6 @@
- + @@ -16,7 +16,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -173,6 +173,20 @@ + + + + + + + + + + diff --git a/firestar/src/main/java/Waldorf.java b/firestar/src/main/java/Waldorf.java index 0e96df1..f9c525c 100644 --- a/firestar/src/main/java/Waldorf.java +++ b/firestar/src/main/java/Waldorf.java @@ -18,8 +18,6 @@ import javax.imageio.ImageIO; import javax.swing.*; -import javax.swing.filechooser.FileFilter; -import javax.swing.filechooser.FileNameExtensionFilter; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -28,7 +26,6 @@ import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; -import java.nio.file.Files; import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE; @@ -43,6 +40,7 @@ public class Waldorf implements ActionListener { private JButton dwnSDKbtn; private JButton dwnARCbtn; private JButton fOutpathChangebtn; + private JCheckBox checkUpdatesToggle; MissPiggy invoker; private String tOutPath = Main.outpath; @@ -57,7 +55,7 @@ public class Waldorf implements ActionListener { } catch (IOException e) { System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon."); } - frame.setSize(600, 200); // 1280 800 + frame.setSize(600, 300); // 1280 800 frame.setMinimumSize(new Dimension(200,100)); frame.setTitle("Options"); frame.setResizable(false); @@ -70,13 +68,12 @@ public class Waldorf implements ActionListener { okbtn.addActionListener(this); resetbtn.addActionListener(this); bOpenFolder.addActionListener(this); - dwnARCbtn.addActionListener(this); dwnSDKbtn.addActionListener(this); - fOutpathChangebtn.addActionListener(this); fOutpath.setText(Main.outpath); + checkUpdatesToggle.setSelected(Main.checkUpdates); frame.setVisible(true); frame.addWindowListener(new WindowAdapter() { @@ -97,6 +94,7 @@ public class Waldorf implements ActionListener { } else if (actionEvent.getSource() == okbtn) { Main.outpath = tOutPath; + Main.checkUpdates = checkUpdatesToggle.isSelected(); Main.writeConf(); Main.loadConf();