Gspöt - retained GUI lib

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Gspöt - retained GUI lib

Like the subject says, it's a stateful gui (moved to new thread from "what are you working on")

Features include :
- single file lib for easy inclusion
- range of one-line GUI elements with default functionality, including circular elements, button, checkbox, scrollgroup, auto-positioning feedback, etc
- easy callbacks for a wide range of events
- element grouping with cascading styles
- flexible positioning type with operator functions
- instanced GUI for easy implementation and interaction across multiple screens

Code: Select all

gui = require('Gspot')

button = gui:button('do thing', {x = 64, y = 64, w = 64})
button.click = function(this) gui:feedback('thing done') end
Although all planned functionality is working, I would still consider this a work in progress, as it remains to some degree untested, and I'm open to suggestions and requests.

github : https://github.com/trubblegum/Gspot

I try to keep the github wiki up to date, but it may lag a day or two behind.

The license says you can do what you want with it, but don't blame me if you break it or it breaks you
enjöy
Gspot.love
Gspot lib + demo
Last edited by trubblegum on Fri Nov 30, 2012 10:25 am, edited 62 times in total.

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Correction :
option elements now receive focus and respond to the done() event without using the keyboard to edit their value.

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Yet another stateful GUI

I don't think this "is another" one. It deserves a name.
Silly suggestion. Use another grey variation for the scrollbar when focused.
As I told in original WIP thread the "dn" button aligned with last option is more natural. Probably for now "only" missing multiple select.
Seems all quite nice and would be a nice library. Very nice work trubblegum!

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Thanks very much

Re scrollbar controls : they're only there to demonstrate interacting with the scrollbar from outside of its element, so their positioning is entirely down to the individual implementation.

Re a name : I wanted to call it "gooey", but it looks like that one was taken a long time ago.
I might call it FTLgui (For The Löve, not Faster Than Light or For The Lose), as I'l probably be making more libraries which can use the same prefix.
Any other suggestions?

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Yet another stateful GUI

trubblegum wrote: Any other suggestions?
In LOVE tradition "G-Spot" = Graphical SPatial Oriented Technology, lol

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Very nice! I may go with "Gspöt"

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Now with added text elements, lövingly formatted by the gui.

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Elements should now be show/hide-able, along with their children (elementlets?).

trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Now with instancing and .love for your convenience.

bugs : Automatic stacking in scrollgroup isn't right, and I'm not sure why.

Some changes :
- most functions need to have a reference to the gui object passed to them, in order to support multiple gui instances.
- elements now carry a reference to their gui in element.Gspot, to make things, shall we say .. easier to find

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Gspöt - formerly Yet another stateful GUI

Thanks for the .love. Easier this way. Strangely after so much of your work, only now got now a first error/problem. Please right click in head/title of Lorem ipsum box. 504 line error right?

There's a reason for scrollbar "handler" when at top/bottom be smaller? Shouldn't the height of it be constant?

Things are looking good, however the demo don't seem show all power of the gui like for example show all easy hide a object (and subojects). Great work.

Who is online

Users browsing this forum: No registered users and 6 guests