From 75bd18fc8aac23e8b372a6bc228fad951f62f008 Mon Sep 17 00:00:00 2001 From: inderpxar Date: Mon, 25 Dec 2023 18:34:19 -0500 Subject: [PATCH] Default import image/loopsound/music to the actual folder --- src/main/java/com/WooGLEFX/Engine/Main.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/WooGLEFX/Engine/Main.java b/src/main/java/com/WooGLEFX/Engine/Main.java index 25b4db3..ce260a0 100644 --- a/src/main/java/com/WooGLEFX/Engine/Main.java +++ b/src/main/java/com/WooGLEFX/Engine/Main.java @@ -1138,9 +1138,9 @@ public static void updateLevelResources() { } public static void importImage() { - FileChooser fileChooser = new FileChooser(); - + String wogDir = level.getVersion() == 1.3 ? FileManager.getOldWOGdir() : FileManager.getNewWOGdir(); + fileChooser.setInitialDirectory(new File(wogDir + "\\res\\images\\")); List resrcFiles = fileChooser.showOpenMultipleDialog(new Stage()); if (resrcFiles != null && resrcFiles.size() > 0) { @@ -1269,6 +1269,8 @@ public static void confirmedCleanLevelResources(ArrayList toClean) public static void importMusic() { FileChooser fileChooser = new FileChooser(); + String wogDir = level.getVersion() == 1.3 ? FileManager.getOldWOGdir() : FileManager.getNewWOGdir(); + fileChooser.setInitialDirectory(new File(wogDir + "\\res\\music")); fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("OGG sound file", "*.ogg")); File resrcFile = fileChooser.showOpenDialog(new Stage()); @@ -1366,6 +1368,8 @@ && new File(FileManager.getNewWOGdir() + "\\res\\music\\" + resrcFile.getName()) public static void importLoopsound() { FileChooser fileChooser = new FileChooser(); + String wogDir = level.getVersion() == 1.3 ? FileManager.getOldWOGdir() : FileManager.getNewWOGdir(); + fileChooser.setInitialDirectory(new File(wogDir + "\\res\\sounds")); fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("OGG sound file", "*.ogg")); File resrcFile = fileChooser.showOpenDialog(new Stage());