diff --git a/assets/plugins/plugin-9patch-0.0.8.jar b/assets/plugins/plugin-9patch-0.0.8.jar index a7635a77..8044429d 100644 Binary files a/assets/plugins/plugin-9patch-0.0.8.jar and b/assets/plugins/plugin-9patch-0.0.8.jar differ diff --git a/assets/plugins/plugin-performance-0.0.8.jar b/assets/plugins/plugin-performance-0.0.8.jar index c18cb010..90e30b05 100644 Binary files a/assets/plugins/plugin-performance-0.0.8.jar and b/assets/plugins/plugin-performance-0.0.8.jar differ diff --git a/assets/plugins/plugin-skin-composer-0.0.8.jar b/assets/plugins/plugin-skin-composer-0.0.8.jar index 881a45ad..ae8f5303 100644 Binary files a/assets/plugins/plugin-skin-composer-0.0.8.jar and b/assets/plugins/plugin-skin-composer-0.0.8.jar differ diff --git a/assets/plugins/plugin-tiled-0.0.8.jar b/assets/plugins/plugin-tiled-0.0.8.jar index aa81519c..9930452c 100644 Binary files a/assets/plugins/plugin-tiled-0.0.8.jar and b/assets/plugins/plugin-tiled-0.0.8.jar differ diff --git a/plugin-tiled/src/main/java/games/rednblack/editor/plugin/tiled/view/dialog/ImportTileSetDialogMediator.java b/plugin-tiled/src/main/java/games/rednblack/editor/plugin/tiled/view/dialog/ImportTileSetDialogMediator.java index 7d60958e..5c3e6237 100644 --- a/plugin-tiled/src/main/java/games/rednblack/editor/plugin/tiled/view/dialog/ImportTileSetDialogMediator.java +++ b/plugin-tiled/src/main/java/games/rednblack/editor/plugin/tiled/view/dialog/ImportTileSetDialogMediator.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.PixmapIO; import games.rednblack.editor.plugin.tiled.TiledPlugin; +import games.rednblack.editor.renderer.data.TexturePackVO; import games.rednblack.h2d.common.MsgAPI; import games.rednblack.h2d.common.plugins.PluginAPI; import org.puremvc.java.interfaces.IFacade; @@ -52,6 +53,14 @@ public class ImportTileSetDialogMediator extends Mediator { int tileW = viewComponent.getTileWidth(); int tileH = viewComponent.getTileHeight(); + TexturePackVO texturePackVO = pluginAPI.getCurrentProjectInfoVO().imagesPacks.get(name + "-tile-set"); + if (texturePackVO == null) { + texturePackVO = new TexturePackVO(); + texturePackVO.name = name + "-tile-set"; + + pluginAPI.getCurrentProjectInfoVO().imagesPacks.put(texturePackVO.name, texturePackVO); + } + int i = 0; for (int x = 0; x < pixmap.getWidth(); x += tileW) { for (int y = 0; y < pixmap.getHeight(); y += tileH) { @@ -65,6 +74,7 @@ public class ImportTileSetDialogMediator extends Mediator { PixmapIO.writePNG(path, tilePixmap); tilePixmap.dispose(); + texturePackVO.regions.add(name + i); i++; } } @@ -72,6 +82,8 @@ public class ImportTileSetDialogMediator extends Mediator { pixmap.dispose(); viewComponent.close(); + + facade.sendNotification(MsgAPI.UPDATE_ATLAS_PACK_LIST); facade.sendNotification(MsgAPI.ACTION_REPACK); }