Skip to content

Commit

Permalink
Default import image/loopsound/music to the actual folder
Browse files Browse the repository at this point in the history
  • Loading branch information
meh2481 committed Dec 25, 2023
1 parent edc13ba commit 75bd18f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/com/WooGLEFX/Engine/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<File> resrcFiles = fileChooser.showOpenMultipleDialog(new Stage());

if (resrcFiles != null && resrcFiles.size() > 0) {
Expand Down Expand Up @@ -1269,6 +1269,8 @@ public static void confirmedCleanLevelResources(ArrayList<EditorObject> 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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 75bd18f

Please sign in to comment.