The two I've used are Quickie (
https://love2d.org/wiki/Quickie) and my own (
https://github.com/trubblegum/Gspot).
I'd say they're equally easy to implement.
My docs are still a little shaky on some of the finer details until I get around to updating them (basic implementation has not changed since the last wiki update), but Gspot does offer a good deal of power once you get to know it (you could make a whole game out of it), and I'm always on hand to assist should questions arise.
Implementation looks like :
Code: Select all
gui = require('Gspot')
name = gui:input('name', {x, y, w, h}) -- optional label, pos, parent, value args
name.done = function(this) print(this.value) end -- element.done is called when enter is pressed while the element has focus
You still have to call gui:update(dt), gui:draw(), etc, to pass events along to the gui, but you will have to do this in any case. The repo contains a commented demo (main.lua) which explains everything you need to get started.
It has a nice flexible positioning object (operators defined, accepts 0-5 args, and dynamically changes shape), cascading styling and positioning, all the callbacks you can eat, and a few handy extras and shortcuts, like "typeout" and fading feedback text objects, auto-positioning options, a re-definable mouse getter, etc.
This is made almost entirely (not the backdrop effect) using Gspot :
- A-net.love
- WIP - no actual game included
- (16.7 KiB) Downloaded 109 times
Most of the "action" is on the prefs screen (stateprefs.lua s.load()), but there's some potentially interesting camera stuff going on too.
I don't know of anyone else having implemented it yet, so it would be great to get some feedback. Naturally, I think it's wonderful, because I made it work in a way that I would find easy to use, and would lend itself well to making game objects.
Of course, your best bet is to look over some docs, pick a couple of likely-looking candidates, and try out some implementations to see what works best for you. You will probably end up making changes somewhere down the line anyway.
It will be hard to find someone with the time and inclination to do a full comparison of all or even most of the available libs, but there's a quick rundown of one of them anyway.
Edit : Updated the wiki this morning.