From 8d2de2db2e9dc522cdb398f621f7dc9b0f8d13ad Mon Sep 17 00:00:00 2001 From: raeleus Date: Sun, 18 Feb 2024 08:10:33 -0800 Subject: [PATCH] The position of a newly loaded effect is now set to the position of the old one. Resolves #6. --- CHANGES.md | 1 + core/src/main/java/com/ray3k/gdxparticleeditor/Utils.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c3d6be5..795c520 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Changelog ### Version 1.0.6 * Resolved issue with Angle still affecting the emitter despite being deactivated. Thanks ludek17052. +* The position of a newly loaded effect is now set to the position of the old one. Thanks ChinQingl. ### Version 1.0.5 * Fix export file dialog defaulting to an incorrect path * Fixed image name error when loading old particle effects with whole paths listed in the particle file diff --git a/core/src/main/java/com/ray3k/gdxparticleeditor/Utils.java b/core/src/main/java/com/ray3k/gdxparticleeditor/Utils.java index 7614ab6..f575e1e 100644 --- a/core/src/main/java/com/ray3k/gdxparticleeditor/Utils.java +++ b/core/src/main/java/com/ray3k/gdxparticleeditor/Utils.java @@ -128,7 +128,6 @@ public static boolean loadParticle(FileHandle fileHandle, ObjectMap 0) { + var emitter = activeEmitters.orderedKeys().get(0); + newParticleEffect.setPosition(emitter.getX(), emitter.getY()); + } + disposeParticleEffect(); sprites.clear(); fileHandles.clear();