What is the easiest/simplest gui library to implement?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: What is the easiest/simplest gui library to implement?

Post by trubblegum »

vrld wrote:You could help keeping libraries active by using them and more importantly by giving feedback. When the authors get the feeling that no one uses their stuff they will most likely stop developing it. When the authors don't get bug reports/feature request they will think everything is fine and also stop developing.
Absolutely spot on.

The only real problem with your Gspot implementation is that parent is undefined.
Normally that would be a reference to a hidden or group element, from which the rest of the dialogue inherits its positioning etc.
You can also use :

Code: Select all

group = gui:hidden('', {64, 64})
ip = group:addchild(gui:input('IP', {w = 128}), 'vertical')
.. which automatically positions elements. In this case, stacked vertically.

Also, I would use something like :

Code: Select all

ip.done = function() port:focus() end -- triggered when you hit enter while the element has focus
port.done = function() button:click() end
ip.next, port.next = port, ip -- sets tab ordering
ip:focus()
I'll double-check to make sure the tabbing feature is documented though.

I think I'd disagree on intuitiveness - I think if you have an object, you intuitively expect it to be an object - but that one's, to some extent, at least, subjective.
I'm pretty sure you get more power with a stateful or retained object, but it does come at the cost of complexity.
I don't mean to undersell Quickie, it's just that you get less scope for manipulation if your objects are so ephemeral.

Edit : Tab ordering is now documented, and I'll be working on extending the focus mechanism in the next update.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: What is the easiest/simplest gui library to implement?

Post by vrld »

trubblegum wrote:I think if you have an object, you intuitively expect it to be an object
The object oriented way has corrupted greatly influenced your thinking. ;)
To make the point clear: A widget does not have to be an object, just as there is no need for text output to be wrapped in an object. You can do it, and do it consistently (as seen in C++ and Java), but you don't have to. It's a mindset.
trubblegum wrote:I'm pretty sure you get more power with a stateful or retained object, but it does come at the cost of complexity.
I disagree on this point too: It is possible to build a persistent GUI API on top of imgui. The opposite is not true. Thus - by definition - immediate mode is more powerful than retain mode. There are also some more advanced APIs than Quickie, e.g. nvidia-widgets and top-gui. Apparently they use it in Unity too.

Also, the main point of imgui is not the elimination of state, but to get transparent control over the widget hierarchy. Or as the (re)inventor of this concept puts it:
casey wrote:In general, I think it's important to remember that IMGUI is about maximizing the convenience to the library user. Since UI libraries are generally not resource bottlenecks, "getting rid of redundant state" is typically not about saving memory or processing power, it's about making the user of the library do less work to ensure proper behavior. [...] That's really all IMGUI is trying to do. Make it simple for the user to use and use properly.
But that's enough off-topic talk for now ;)
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 34 guests