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
See also: viewtopic.php?t=94687
Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
Last edited by darkfrei on Tue Dec 31, 2024 6:48 pm, edited 1 time in total.
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
Re: lovepatch - A 9-patch library for LÖVE
I haven't been on this platform for quite a while. But I made some changes to this library which allow you to now have non-symmetrical edges on the 9-patch objects. Thank you all for using this library. And thanks to darkfrei too.
Code: Select all
loves_lua = "not so",
wants_to = true
Who is online
Users browsing this forum: Google [Bot] and 8 guests