From 8f3bce7d6fe41e85f2654f7557bbb564305e58b5 Mon Sep 17 00:00:00 2001 From: matthias-luger <58751503+matthias-luger@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:32:26 +0100 Subject: Add TFM Purchase UI to Mod (#78) * Add TFM Purchase UI to Mod * fix up opening flips by hotkey fix up flip message in tfm ui * readded check if the auction should be drawn mod doesnt crash anymore if a non flip auction is opened * added /cofl set gui command changed gui title * added /fc toggle command dont store toggle locally * rename purchaseOverlay config removed unused code renamed gui command to /cofl set ahbuygui * fix message not available if flip opened by mouse fix old message shown for non flip auctions * added /cofl setGui command added cofl purchase gui * Add sound on flip * Fixed new flip sound Optimized cofl gui Removed flickering of default mc gui Move mouse to middle on screen open * remove unused code * remove debug code * don't open guis if not in skyblock * fix sound being null * fix bed flips fix opening /cofl blocked * remove logging * Rewrote cofl gui to render before the chest gui opens * - fix bed flips - invalidate best flips after open * - fix scrolling * - fix description not updating - case insensitive commands - fix up , at the end of the message * - add gui if item was already bought - fix bug that invalidated too many flips - added missing "break" * fix merge error * add .vscode to gitignore formatting * fix formatting issue * - remove comment - remove emty line --- .../java/de/torui/coflsky/configuration/LocalConfig.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/torui/coflsky/configuration') diff --git a/src/main/java/de/torui/coflsky/configuration/LocalConfig.java b/src/main/java/de/torui/coflsky/configuration/LocalConfig.java index 749d0bc..7e3c5f9 100644 --- a/src/main/java/de/torui/coflsky/configuration/LocalConfig.java +++ b/src/main/java/de/torui/coflsky/configuration/LocalConfig.java @@ -1,7 +1,7 @@ package de.torui.coflsky.configuration; import com.google.gson.Gson; -import com.google.gson.JsonObject; +import de.torui.coflsky.gui.GUIType; import java.io.File; import java.io.IOException; @@ -12,10 +12,14 @@ import java.nio.file.Paths; public class LocalConfig { public boolean autoStart; public boolean extendedtooltips; - public LocalConfig(boolean autoStart,boolean extendedtooltips) { + public GUIType purchaseOverlay; + + public LocalConfig(boolean autoStart, boolean extendedtooltips, GUIType purchaseOverlay) { this.autoStart = autoStart; this.extendedtooltips = extendedtooltips; + this.purchaseOverlay = purchaseOverlay; } + public static void saveConfig(File file, LocalConfig Config) { Gson gson = new Gson(); try { @@ -24,12 +28,12 @@ public class LocalConfig { } Files.write(Paths.get(file.getAbsolutePath()), gson.toJson(Config).getBytes(StandardCharsets.UTF_8)); - }catch (IOException e){ + } catch (IOException e) { e.printStackTrace(); } } public static LocalConfig createDefaultConfig() { - return new LocalConfig(true,true); + return new LocalConfig(true, true, null); } } -- cgit