added check for updates to options
This commit is contained in:
parent
eccc896e89
commit
83efce8f3f
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Waldorf">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Waldorf">
|
||||||
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="10" left="25" bottom="10" right="25"/>
|
<margin top="10" left="25" bottom="10" right="25"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="500" height="400"/>
|
<xy x="20" y="20" width="500" height="400"/>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<children>
|
<children>
|
||||||
<component id="3d88f" class="javax.swing.JButton" binding="okbtn">
|
<component id="3d88f" class="javax.swing.JButton" binding="okbtn">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" column="2" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="6" column="2" row-span="1" col-span="1" vsize-policy="2" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-2271221"/>
|
<background color="-2271221"/>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</component>
|
</component>
|
||||||
<component id="50d13" class="javax.swing.JButton" binding="cancelbtn">
|
<component id="50d13" class="javax.swing.JButton" binding="cancelbtn">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="2" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-2271221"/>
|
<background color="-2271221"/>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
</component>
|
</component>
|
||||||
<component id="252b3" class="javax.swing.JButton" binding="resetbtn">
|
<component id="252b3" class="javax.swing.JButton" binding="resetbtn">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="2" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-2271221"/>
|
<background color="-2271221"/>
|
||||||
|
@ -173,6 +173,20 @@
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
|
<component id="73ca5" class="javax.swing.JCheckBox" binding="checkUpdatesToggle">
|
||||||
|
<constraints>
|
||||||
|
<grid row="5" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<focusPainted value="false"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<label value="Automatically check for updates on startup"/>
|
||||||
|
<opaque value="false"/>
|
||||||
|
<rolloverEnabled value="false"/>
|
||||||
|
<text value="Automatically check for updates on startup"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.filechooser.FileFilter;
|
|
||||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
@ -28,7 +26,6 @@ import java.awt.event.WindowEvent;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
|
||||||
|
|
||||||
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
|
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
|
||||||
|
|
||||||
|
@ -43,6 +40,7 @@ public class Waldorf implements ActionListener {
|
||||||
private JButton dwnSDKbtn;
|
private JButton dwnSDKbtn;
|
||||||
private JButton dwnARCbtn;
|
private JButton dwnARCbtn;
|
||||||
private JButton fOutpathChangebtn;
|
private JButton fOutpathChangebtn;
|
||||||
|
private JCheckBox checkUpdatesToggle;
|
||||||
|
|
||||||
MissPiggy invoker;
|
MissPiggy invoker;
|
||||||
private String tOutPath = Main.outpath;
|
private String tOutPath = Main.outpath;
|
||||||
|
@ -57,7 +55,7 @@ public class Waldorf implements ActionListener {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
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.setMinimumSize(new Dimension(200,100));
|
||||||
frame.setTitle("Options");
|
frame.setTitle("Options");
|
||||||
frame.setResizable(false);
|
frame.setResizable(false);
|
||||||
|
@ -70,13 +68,12 @@ public class Waldorf implements ActionListener {
|
||||||
okbtn.addActionListener(this);
|
okbtn.addActionListener(this);
|
||||||
resetbtn.addActionListener(this);
|
resetbtn.addActionListener(this);
|
||||||
bOpenFolder.addActionListener(this);
|
bOpenFolder.addActionListener(this);
|
||||||
|
|
||||||
dwnARCbtn.addActionListener(this);
|
dwnARCbtn.addActionListener(this);
|
||||||
dwnSDKbtn.addActionListener(this);
|
dwnSDKbtn.addActionListener(this);
|
||||||
|
|
||||||
fOutpathChangebtn.addActionListener(this);
|
fOutpathChangebtn.addActionListener(this);
|
||||||
|
|
||||||
fOutpath.setText(Main.outpath);
|
fOutpath.setText(Main.outpath);
|
||||||
|
checkUpdatesToggle.setSelected(Main.checkUpdates);
|
||||||
|
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
frame.addWindowListener(new WindowAdapter() {
|
frame.addWindowListener(new WindowAdapter() {
|
||||||
|
@ -97,6 +94,7 @@ public class Waldorf implements ActionListener {
|
||||||
} else
|
} else
|
||||||
if (actionEvent.getSource() == okbtn) {
|
if (actionEvent.getSource() == okbtn) {
|
||||||
Main.outpath = tOutPath;
|
Main.outpath = tOutPath;
|
||||||
|
Main.checkUpdates = checkUpdatesToggle.isSelected();
|
||||||
Main.writeConf();
|
Main.writeConf();
|
||||||
Main.loadConf();
|
Main.loadConf();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user