lovepatch - A 9-patch library for LÖVE

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
notcl4y
Citizen
Posts: 85
Joined: Fri Nov 25, 2022 12:23 pm

lovepatch - A 9-patch library for LÖVE

Post by notcl4y »

There are already, of course, the 9-patch libraries for LÖVE. But they work different . :o: 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. :P 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! :awesome:
https://github.com/notcl4y14/lovepatch
Thanks to darkfrei for helping writing the code.
demo.gif
demo.gif (1.26 MiB) Viewed 2072 times

Code: Select all

loves_lua = "not so",
wants_to = true
User avatar
darkfrei
Party member
Posts: 1181
Joined: Sat Feb 08, 2020 11:09 pm

Re: lovepatch - A 9-patch library for LÖVE

Post by darkfrei »

Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
notcl4y
Citizen
Posts: 85
Joined: Fri Nov 25, 2022 12:23 pm

Re: lovepatch - A 9-patch library for LÖVE

Post by notcl4y »

darkfrei wrote: Fri Jun 30, 2023 6:21 pm Nice lib! Actually I've never heard about the 9patch, it was nice to learn something new.
Thanks!

Code: Select all

loves_lua = "not so",
wants_to = true
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: lovepatch - A 9-patch library for LÖVE

Post by pauljessup »

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.
User avatar
notcl4y
Citizen
Posts: 85
Joined: Fri Nov 25, 2022 12:23 pm

Re: lovepatch - A 9-patch library for LÖVE

Post by notcl4y »

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.
Thanks! It's nice to see when someone uses your library!

Sorry if I broke the logic in the sentence!

Code: Select all

loves_lua = "not so",
wants_to = true
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 52 guests