There are already, of course, the 9-patch libraries for LÖVE. But they work different . You had to place in the borders of the image the black pixels and, if I recall correctly, use .9.png file extension. I did not really like this. So I decided to make my own 9-patch library that would just let the user choose the width and height in the load() function alongside with the image path argument.
So here it is!
https://github.com/notcl4y14/lovepatch
Thanks to darkfrei for helping writing the code.
lovepatch - A 9-patch library for LÖVE
lovepatch - A 9-patch library for LÖVE
Code: Select all
loves_lua = "not so",
wants_to = true
Re: lovepatch - A 9-patch library for LÖVE
Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
Re: lovepatch - A 9-patch library for LÖVE
Thanks!
Code: Select all
loves_lua = "not so",
wants_to = true
-
- Party member
- Posts: 356
- Joined: Wed Jul 03, 2013 4:06 am
Re: lovepatch - A 9-patch library for LÖVE
Well that is really cool! Huh. I think I might update my simpleWindows thing to use that, since it already does edges/etc, it just doesn't scale with them/etc.
Re: lovepatch - A 9-patch library for LÖVE
Thanks! It's nice to see when someone uses your library!pauljessup wrote: ↑Sat Jul 01, 2023 4:25 pm Well that is really cool! Huh. I think I might update my simpleWindows thing to use that, since it already does edges/etc, it just doesn't scale with them/etc.
Sorry if I broke the logic in the sentence!
Code: Select all
loves_lua = "not so",
wants_to = true
Who is online
Users browsing this forum: No registered users and 2 guests