which is not exactly the same but gave me an idea how to achieve what I want (more on that later). Nevertheless, I've chosen to add a new topic.
This is my intention. I have a sprite for HUD. Suppose the health bar. Along with the visual indication of the amount of health (by "filling" and "emptying" the bar) I want to have the textual one like 97/100 (see the screenshot).
All I need is the rectangular area inside the image/quad (I wrote a simple library to handle alignment and stuff) to place the text in. Now I do it manually (note that this is only first step in that direction): I draw my sprites in Aseprite, then I select the corresponding area and look at the values (x, y, w, h). I have several approaches to improve that:
1) Aseprite allows you to export a JSON file with user defined metadata along with the PNG. So you export your sprite and get two files: `icon.png` and `icon.json`. I don't really like this approach because it involves processing json and storing redundant data.
2) Aseprite allows you to write scripts in ... Lua (I am very exciting about this). So the idea is to write a script that
- Asks the user for a selection
- Asks the user for the name of the selected area
- Fills the predefined (or asks for) file for sprites and fills that with that data and saves the sprites
So what is your suggestion here ?
Thank you in advance !