From 3977ce93e27bd66dc581df19fe4b996e1f907bdf Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Sat, 30 Nov 2013 15:57:54 +0100 Subject: [PATCH] Path for RegionAttachment. --- .../spine/attachments/AtlasAttachmentLoader.java | 1 + .../spine/attachments/RegionAttachment.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java b/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java index bb0532f20..a8814f072 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java @@ -48,6 +48,7 @@ public class AtlasAttachmentLoader implements AttachmentLoader { public RegionAttachment newRegionAttachment (Skin skin, String name, String path) { RegionAttachment attachment = new RegionAttachment(name); + attachment.setPath(path); AtlasRegion region = atlas.findRegion(path); if (region == null) throw new RuntimeException("Region not found in atlas: " + attachment + " (region attachment: " + name + ")"); diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java b/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java index e3ae145e9..1290cd342 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java @@ -57,6 +57,7 @@ public class RegionAttachment extends Attachment { static public final int BRY = 7; private TextureRegion region; + private String path; private float x, y, scaleX = 1, scaleY = 1, rotation, width, height; private final float[] vertices = new float[20]; private final float[] offset = new float[8]; @@ -275,4 +276,12 @@ public class RegionAttachment extends Attachment { public Color getColor () { return color; } + + public String getPath () { + return path; + } + + public void setPath (String path) { + this.path = path; + } }