From 7e7ec9ea584ad7aaa24605a64d3a624a3fc4c584 Mon Sep 17 00:00:00 2001 From: Willem Date: Tue, 1 Mar 2022 19:30:57 +0100 Subject: [PATCH] Moved file chooser into service --- .../gdxapp4d/tos4/GDXAppTos4.java | 8 +------- .../gdxapp4d/tos4/GDXAppTos4Activator.java | 15 +++++++++++---- .../gdxapp4d/tos4/service/SystemWarpBootArgs.java | 3 +++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java index e8c02e86..4599eece 100644 --- a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4.java @@ -33,7 +33,6 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ,Screen> screens; - private NativeFileChooser fileChooser; private final GuageCounterᴶᴹˣ selectScreenCounter; private final BãßBȍőnCoffinOpenʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } @@ -45,10 +44,9 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { - this.fileChooser = fileChooser; screens = new HashMap<>(); systemActivator = new GDXAppTos4Activator(); - systemActivator.BãßInit(args, viewWidth, viewHeight, this); + systemActivator.BãßInit(args, viewWidth, viewHeight, fileChooser, this); } @Override @@ -114,8 +112,4 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ args; - public int viewWidth; - public int viewHeight; + private List args; + private int viewWidth; + private int viewHeight; + private NativeFileChooser fileChooser; private File hyperdriveHome; private File warpshipHome; private WaterDevice warpshipDevice; @@ -49,10 +51,11 @@ public class GDXAppTos4Activator implements BundleActivator { public GDXAppTos4Activator() { } - public void BãßInit(List args, int viewWidth, int viewHeight, SystemWarpTerminal systemWarpTerminal) { + public void BãßInit(List args, int viewWidth, int viewHeight,NativeFileChooser fileChooser, SystemWarpTerminal systemWarpTerminal) { this.args = args; this.viewWidth = viewWidth; this.viewHeight = viewHeight; + this.fileChooser = fileChooser; this.systemWarpTerminal = systemWarpTerminal; } @@ -260,6 +263,10 @@ public class GDXAppTos4Activator implements BundleActivator { return viewHeight; } + @Override + public NativeFileChooser getFileChooser() { + return fileChooser; + } } public class SystemWarpShipImpl implements SystemWarpShip { diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java index 7be99aad..e16901b3 100644 --- a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/service/SystemWarpBootArgs.java @@ -3,6 +3,7 @@ package love.distributedrebirth.gdxapp4d.tos4.service; import java.util.List; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +import net.spookygames.gdx.nativefilechooser.NativeFileChooser; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface SystemWarpBootArgs { @@ -12,4 +13,6 @@ public interface SystemWarpBootArgs { int getBootWindowWidth(); int getBootWindowHeight(); + + NativeFileChooser getFileChooser(); }