Simple 9-slice sprite drawing #6
Labels
No Label
2d
3d
bug
discussion
feature
high priority
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wanp/townengine#6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It's actually not easy at all!
There will have to be a compromise somewhere between simplicity and terseness. The engine is currently incapable of rendering sub-regions of sprites (as opposed to the whole texture), so the typical strategy involving a single square texture containing the nine slices is not going to work. We can always just draw 9 individual textures, though...
The short, but slightly complicated way is guessing all the texture paths:
This might be a little too magical.
The much longer, perfectly clear way:
It's okay, but it's gross.
374a9b9c58
and80ffc30075
allow for repeating textures with texture origin offset! Now it's possible to store 9slice data in single png.