diff --git a/CHANGELOG.md b/CHANGELOG.md index de3c35981..829df0cd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -167,6 +167,7 @@ * Added `Attachment#copy()` to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. * Added `MeshAttachment#newLinkedMesh()`, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. * Added IK softness. + * Exposed `x` and `y` on `SkeletonData` through getters and setters. ### Cocos2d-x * Updated to cocos2d-x 3.17.1 diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonData.h b/spine-cpp/spine-cpp/include/spine/SkeletonData.h index 1947fd273..3b4cfdbad 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonData.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonData.h @@ -127,6 +127,14 @@ public: Vector &getPathConstraints(); + float getX(); + + void setX(float inValue); + + float getY(); + + void setY(float inValue); + float getWidth(); void setWidth(float inValue); diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp index 0daa4c0d4..07ffe3fc9 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonData.cpp @@ -168,6 +168,22 @@ Vector &SkeletonData::getPathConstraints() { return _pathConstraints; } +float SkeletonData::getX() { + return _x; +} + +void SkeletonData::setX(float inValue) { + _x = inValue; +} + +float SkeletonData::getY() { + return _y; +} + +void SkeletonData::setY(float inValue) { + _y = inValue; +} + float SkeletonData::getWidth() { return _width; }