Closed NicEastvillage closed 5 years ago
Custom drawables are not intended to have any affect on the texture atlas. I usually use them to refer to custom classes that I define in skin composer or drawables manually added to the skin in code.
Can you give me an example of what you're trying to acheive? Keep in mind you have full access to the texture packing settings via Project >> Settings >> Open texture packer settings file. Thanks
I see. These is are properties for individual textures in the atlas. Heres an example of what I mean:
Here I have loaded up a custom texture, that I want to use for a button. When I scale the button, the texture becomes stretched:
But I want it to split like this:
To do this I have to export the project, open the .atlas and insert these values for splitting (and padding):
Then I need to re-import the project for the changes to apply.
It not a big issue. I just wanted to suggest it, because I thought it would be nice to, if the user was able to adjust these values from within the program without having to search through a file and re-import while iterating.
The workflow that I want to promote is to use 9patch files to define padding and stretching areas. These files, with appropriate black bars drawn, function correctly with skin composer. Some details here: https://www.gamedevelopment.blog/9-patch-libgdx-tutorial/
GDX texture packer has a great 9 patch tool: https://github.com/crashinvaders/gdx-texture-packer-gui
If you really need to have a dialog for it, it's going to take some work for limited payoff. I'll consider it in a future version.
I added a nine patch editor in version 23.
When creating custom drawables, it is currently not possible to be add or change the split or pad properties. To do this you have to manually set those in the atlas by hand.
I suggest adding a small option menu for each drawable, where you are able to set these properties. Some text fields would be enough, but a preview would be amazing.