Compare commits

...

2 Commits

Author SHA1 Message Date
2e1fe95670 implement Remove All 2024-06-29 04:47:55 -05:00
45fbe80f9f remove mention of fast mode 2024-06-29 04:47:47 -05:00
2 changed files with 14 additions and 7 deletions

View File

@ -95,7 +95,7 @@ public class Kermit implements ActionListener {
button.setVisible(false);frame.remove(button);
button2.setVisible(false);frame.remove(button2);
dialogText.setVisible(false);frame.remove(dialogText);
changePage(Pages.EXPORT_MODE);
changePage(Pages.SDK_INSTALL); // EXPORT_MODE
break;
case EXPORT_MODE:
button.setVisible(false);frame.remove(button);

View File

@ -31,6 +31,7 @@ import java.io.IOException;
import java.math.RoundingMode;
import java.nio.file.*;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.regex.Pattern;
@ -343,7 +344,18 @@ public class MissPiggy implements ActionListener {
public void removeAllGUI() {
// todo warning dialog that nukes list when Yes is clicked
throwUnimplemented();
int result = JOptionPane.showConfirmDialog(frame, "Do you really want to delete all mods?", "Remove All", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
for (Main.Mod entry : Main.Mods) {
new File(System.getProperty("user.home") + "/.firestar/mods/" + entry.path).delete();
}
}
new File(System.getProperty("user.home") + "/.firestar/mods/index").delete();
Main.Mods.clear();
InitializeModListStructure();
InitializeModListInGUI();
}
public void optionsGUI() {
@ -361,11 +373,6 @@ public class MissPiggy implements ActionListener {
throwUnimplemented();
}
public void aboutGUI() {
// todo about page
throwUnimplemented();
}
public void throwUnimplemented() {
JOptionPane.showMessageDialog(frame, "Unimplemented.\nSee README at https://git.worlio.com/bonkmaykr/firestar", "Unimplemented", JOptionPane.INFORMATION_MESSAGE);
}