Moved file chooser into service

This commit is contained in:
Willem Cazander 2022-03-01 19:30:57 +01:00
parent b526b97558
commit 7e7ec9ea58
3 changed files with 15 additions and 11 deletions

View file

@ -33,7 +33,6 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppTos4,GDXAppT
private Framework systemBundle; private Framework systemBundle;
private GDXAppTos4Activator systemActivator; private GDXAppTos4Activator systemActivator;
private Map<Class<? extends Screen>,Screen> screens; private Map<Class<? extends Screen>,Screen> screens;
private NativeFileChooser fileChooser;
private final GuageCounterᴶᴹˣ selectScreenCounter; private final GuageCounterᴶᴹˣ selectScreenCounter;
private final BãßBȍőnCoffinOpenʸᴰ<GDXAppTos4Keyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); private final BãßBȍőnCoffinOpenʸᴰ<GDXAppTos4Keyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<GDXAppTos4Keyʸᴰ> GET_BBC() { return BBC; } public BãßBȍőnCoffinʸᴰ<GDXAppTos4Keyʸᴰ> GET_BBC() { return BBC; }
@ -45,10 +44,9 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppTos4,GDXAppT
} }
public void BãßInit(List<String> args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { public void BãßInit(List<String> args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) {
this.fileChooser = fileChooser;
screens = new HashMap<>(); screens = new HashMap<>();
systemActivator = new GDXAppTos4Activator(); systemActivator = new GDXAppTos4Activator();
systemActivator.BãßInit(args, viewWidth, viewHeight, this); systemActivator.BãßInit(args, viewWidth, viewHeight, fileChooser, this);
} }
@Override @Override
@ -114,8 +112,4 @@ public enum GDXAppTos4 implements DefaultEnumInstanceᴶᴹˣ<GDXAppTos4,GDXAppT
this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
selectScreenCounter.increment(); selectScreenCounter.increment();
} }
public NativeFileChooser getFileChooser() {
return fileChooser;
}
} }

View file

@ -29,13 +29,15 @@ import love.distributedrebirth.warpme.sea.WaterSeaChain;
import love.distributedrebirth.warpme.sea.WaterSeaMagic; import love.distributedrebirth.warpme.sea.WaterSeaMagic;
import love.distributedrebirth.warpme.ship.WaterDevice; import love.distributedrebirth.warpme.ship.WaterDevice;
import love.distributedrebirth.warpme.ship.WaterDeviceDriver; import love.distributedrebirth.warpme.ship.WaterDeviceDriver;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class GDXAppTos4Activator implements BundleActivator { public class GDXAppTos4Activator implements BundleActivator {
public List<String> args; private List<String> args;
public int viewWidth; private int viewWidth;
public int viewHeight; private int viewHeight;
private NativeFileChooser fileChooser;
private File hyperdriveHome; private File hyperdriveHome;
private File warpshipHome; private File warpshipHome;
private WaterDevice warpshipDevice; private WaterDevice warpshipDevice;
@ -49,10 +51,11 @@ public class GDXAppTos4Activator implements BundleActivator {
public GDXAppTos4Activator() { public GDXAppTos4Activator() {
} }
public void BãßInit(List<String> args, int viewWidth, int viewHeight, SystemWarpTerminal systemWarpTerminal) { public void BãßInit(List<String> args, int viewWidth, int viewHeight,NativeFileChooser fileChooser, SystemWarpTerminal systemWarpTerminal) {
this.args = args; this.args = args;
this.viewWidth = viewWidth; this.viewWidth = viewWidth;
this.viewHeight = viewHeight; this.viewHeight = viewHeight;
this.fileChooser = fileChooser;
this.systemWarpTerminal = systemWarpTerminal; this.systemWarpTerminal = systemWarpTerminal;
} }
@ -260,6 +263,10 @@ public class GDXAppTos4Activator implements BundleActivator {
return viewHeight; return viewHeight;
} }
@Override
public NativeFileChooser getFileChooser() {
return fileChooser;
}
} }
public class SystemWarpShipImpl implements SystemWarpShip { public class SystemWarpShipImpl implements SystemWarpShip {

View file

@ -3,6 +3,7 @@ package love.distributedrebirth.gdxapp4d.tos4.service;
import java.util.List; import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface SystemWarpBootArgs { public interface SystemWarpBootArgs {
@ -12,4 +13,6 @@ public interface SystemWarpBootArgs {
int getBootWindowWidth(); int getBootWindowWidth();
int getBootWindowHeight(); int getBootWindowHeight();
NativeFileChooser getFileChooser();
} }