Skip to content

Commit

Permalink
Particle editor as independent app
Browse files Browse the repository at this point in the history
  • Loading branch information
bladecoder committed Feb 5, 2024
1 parent b16be79 commit 96fc526
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions adventure-editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ dependencies {

implementation project(":blade-engine")
implementation project(":blade-engine-spine-plugin")
implementation files('libs/gdx-particle-editor.jar')
}

task setVersion(type: WriteProperties) {
Expand Down Expand Up @@ -123,6 +122,7 @@ task pack {
distZip {
into(project.name + '-' + project.version) {
from '.'
include 'desktop/*'
// include desktop and thirdparty folders
include('desktop/*', 'thirdparty/*')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,32 @@ public void run() {
private void particleEditor() {
// Open the particle editor
List<String> cp = new ArrayList<>();
cp.add(System.getProperty("java.class.path"));
// check that particle editor exists
String[] particleEditorPaths = {
"../thirdparty/gdx-particle-editor.jar",
"./adventure-editor/thirdparty/gdx-particle-editor.jar",
"./thirdparty/gdx-particle-editor.jar"
};

String particleEditorPath = null;

boolean found = false;

for (String path : particleEditorPaths) {
File f = new File(path);
if (f.exists()) {
particleEditorPath = path;
found = true;
break;
}
}

if (!found) {
Message.showMsgDialog(getStage(), "Error", "Particle Editor not found.");
return;
}

cp.add(particleEditorPath);
try {
RunProccess.runJavaProccess("com.ray3k.gdxparticleeditor.lwjgl3.Lwjgl3Launcher", cp, null);
} catch (IOException e) {
Expand Down
Binary file not shown.

0 comments on commit 96fc526

Please sign in to comment.