Compare commits
3 Commits
16f729e4c2
...
483541e396
Author | SHA1 | Date | |
---|---|---|---|
483541e396 | |||
b5f04cf87d | |||
079697fb89 |
|
@ -16,19 +16,16 @@
|
|||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Bert implements ActionListener {
|
||||
BufferedImage windowIcon;
|
||||
public JFrame frame = new JFrame();
|
||||
private JPanel frameContainer;
|
||||
private JButton cancelbtn;
|
||||
|
@ -60,12 +57,7 @@ public class Bert implements ActionListener {
|
|||
cancelbtn.addActionListener(this);
|
||||
downloadbtn.addActionListener(this);
|
||||
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
|
||||
frame.setVisible(true);
|
||||
frame.addWindowListener(new WindowAdapter() {
|
||||
|
|
|
@ -20,18 +20,14 @@ import net.lingala.zip4j.ZipFile;
|
|||
import net.lingala.zip4j.exception.ZipException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
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;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
|
||||
|
||||
|
@ -84,12 +80,7 @@ public class Clifford implements ActionListener {
|
|||
creating = false;
|
||||
|
||||
frame.add(frameContainer);
|
||||
try {
|
||||
BufferedImage windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find resource titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
frame.setSize(600, 300); // 1280 800
|
||||
frame.setMinimumSize(new Dimension(200,100));
|
||||
frame.setTitle("Options");
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.awt.event.ActionEvent;
|
|||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -33,7 +32,6 @@ import java.net.URL;
|
|||
import java.nio.charset.Charset;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
|
@ -61,18 +59,12 @@ public class Ernie implements ActionListener {
|
|||
private JButton surebtn;
|
||||
|
||||
public boolean backgroundDone = false;
|
||||
private BufferedImage windowIcon;
|
||||
|
||||
private JFrame parent;
|
||||
|
||||
public Ernie(JFrame parent) {
|
||||
this.parent = parent;
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
byte[] urlraw = getFile(gitapi+"/releases?draft=false&pre-release=false");
|
||||
if (urlraw.length <= 0) {
|
||||
JOptionPane.showMessageDialog(frame, "Internal Error: Couldn't check for updates.", "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||
|
|
|
@ -19,18 +19,12 @@
|
|||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.Optional;
|
||||
|
||||
public class Fozzie {
|
||||
BufferedImage windowIcon;
|
||||
private JFrame frame = new JFrame();
|
||||
public JProgressBar progressBar;
|
||||
private JPanel frameContainer;
|
||||
|
@ -55,12 +49,7 @@ public class Fozzie {
|
|||
frame.setLayout(new GridLayout());
|
||||
frame.setLocationRelativeTo(null);
|
||||
frame.setAlwaysOnTop(true);
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
frame.setVisible(true);
|
||||
|
||||
label.setText("Downloading \"" + dname + "\"");
|
||||
|
@ -110,12 +99,7 @@ public class Fozzie {
|
|||
frame.setLayout(new GridLayout());
|
||||
frame.setLocationRelativeTo(null);
|
||||
frame.setAlwaysOnTop(true);
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
frame.setVisible(true);
|
||||
|
||||
label.setText(text);
|
||||
|
|
|
@ -21,13 +21,11 @@ import com.github.difflib.UnifiedDiffUtils;
|
|||
import com.github.difflib.patch.Patch;
|
||||
import net.lingala.zip4j.ZipFile;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.TitledBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
|
@ -60,12 +58,7 @@ public class Gonzo {
|
|||
|
||||
frame.add(frameContainer); // initialize window contents -- will be handled by IntelliJ IDEA
|
||||
|
||||
try {
|
||||
BufferedImage windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
frame.setSize(800, 400);
|
||||
frame.setMinimumSize(new Dimension(600,400));
|
||||
frame.setTitle("Mod Installation");
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
|
@ -24,32 +23,23 @@ import javax.swing.text.DefaultCaret;
|
|||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.file.*;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Pattern;
|
||||
import net.lingala.zip4j.*;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import static java.nio.file.StandardCopyOption.*;
|
||||
|
||||
import static javax.swing.WindowConstants.EXIT_ON_CLOSE;
|
||||
|
||||
public class MissPiggy implements ActionListener {
|
||||
BufferedImage windowIcon;
|
||||
JFrame frame = new JFrame();
|
||||
JPanel frameContainer;
|
||||
JPanel actionsContainer;
|
||||
|
@ -154,12 +144,7 @@ public class MissPiggy implements ActionListener {
|
|||
descriptionField.getDocument().putProperty("filterNewlines", Boolean.FALSE);
|
||||
|
||||
// display window
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
|
||||
menuBar.setBackground(new Color(25, 41, 93));
|
||||
fileMenu.setForeground(new Color(255, 255, 255));
|
||||
|
|
87
firestar/src/main/java/Rizzo.java
Normal file
87
firestar/src/main/java/Rizzo.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Firestar Mod Manager
|
||||
* Copyright (C) 2024 bonkmaykr
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class Rizzo {
|
||||
|
||||
public void Rizzo(File infile) {
|
||||
|
||||
}
|
||||
|
||||
public static String[] translateCommandline(String toProcess) {
|
||||
if (toProcess == null || toProcess.length() == 0) {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
final int normal = 0;
|
||||
final int inQuote = 1;
|
||||
final int inDoubleQuote = 2;
|
||||
int state = normal;
|
||||
final StringTokenizer tok = new StringTokenizer(toProcess, "\"\' ", true);
|
||||
final ArrayList<String> result = new ArrayList<String>();
|
||||
final StringBuilder current = new StringBuilder();
|
||||
boolean lastTokenHasBeenQuoted = false;
|
||||
|
||||
while (tok.hasMoreTokens()) {
|
||||
String nextTok = tok.nextToken();
|
||||
switch (state) {
|
||||
case inQuote:
|
||||
if ("\'".equals(nextTok)) {
|
||||
lastTokenHasBeenQuoted = true;
|
||||
state = normal;
|
||||
} else {
|
||||
current.append(nextTok);
|
||||
}
|
||||
break;
|
||||
case inDoubleQuote:
|
||||
if ("\"".equals(nextTok)) {
|
||||
lastTokenHasBeenQuoted = true;
|
||||
state = normal;
|
||||
} else {
|
||||
current.append(nextTok);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ("\'".equals(nextTok)) {
|
||||
state = inQuote;
|
||||
} else if ("\"".equals(nextTok)) {
|
||||
state = inDoubleQuote;
|
||||
} else if (" ".equals(nextTok)) {
|
||||
if (lastTokenHasBeenQuoted || current.length() != 0) {
|
||||
result.add(current.toString());
|
||||
current.setLength(0);
|
||||
}
|
||||
} else {
|
||||
current.append(nextTok);
|
||||
}
|
||||
lastTokenHasBeenQuoted = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (lastTokenHasBeenQuoted || current.length() != 0) {
|
||||
result.add(current.toString());
|
||||
}
|
||||
if (state == inQuote || state == inDoubleQuote) {
|
||||
throw new RuntimeException("unbalanced quotes in " + toProcess);
|
||||
}
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
}
|
|
@ -19,14 +19,11 @@
|
|||
import javax.imageio.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
|
||||
|
||||
public class Rowlf {
|
||||
private BufferedImage windowIcon;
|
||||
JFrame frame = new JFrame();
|
||||
JPanel frameContainer;
|
||||
Image logo;
|
||||
|
@ -42,12 +39,7 @@ public class Rowlf {
|
|||
System.out.println("ERROR: Failed to open About screen because we couldn't find an image needed to display the page.");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
|
||||
//frame.add(picLabel);
|
||||
frame.add(frameContainer); // initialize window contents -- will be handled by IntelliJ IDEA
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
|
||||
public class Scooter {
|
||||
private JFrame frame = new JFrame();
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -50,12 +48,7 @@ public class Waldorf implements ActionListener {
|
|||
invoker = inv;
|
||||
|
||||
frame.add(frameContainer);
|
||||
try {
|
||||
BufferedImage windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
frame.setSize(600, 300); // 1280 800
|
||||
frame.setMinimumSize(new Dimension(200,100));
|
||||
frame.setTitle("Options");
|
||||
|
|
|
@ -24,7 +24,6 @@ import javax.swing.text.html.HTMLDocument;
|
|||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
@ -32,7 +31,6 @@ import java.nio.file.Files;
|
|||
import static javax.swing.WindowConstants.EXIT_ON_CLOSE;
|
||||
|
||||
public class WilkinsCoffee implements ActionListener {
|
||||
BufferedImage windowIcon;
|
||||
Image logo;
|
||||
public Pages page;
|
||||
public JFrame frame = new JFrame();
|
||||
|
@ -82,12 +80,7 @@ public class WilkinsCoffee implements ActionListener {
|
|||
// reformat path slightly for windows
|
||||
if (Main.windows) {outPathTemp.replace("/", "\\");}
|
||||
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setIconImage(Main.windowIcon);
|
||||
try {
|
||||
logo = ImageIO.read(Main.class.getResourceAsStream("/programIcon.png")).getScaledInstance(96, 96, Image.SCALE_SMOOTH);
|
||||
picLabel.setIcon(new ImageIcon(logo));picLabel.setText("");
|
||||
|
|
Loading…
Reference in New Issue
Block a user