Gspöt - retained GUI lib

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Gspöt - retained GUI lib

Post by trubblegum »

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
- direct access to GUI elements and attributes via reference

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
(10.38 KiB) Downloaded 2137 times
Last edited by trubblegum on Fri Nov 30, 2012 10:25 am, edited 62 times in total.
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Post by trubblegum »

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

Post by coffee »

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!
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Post by trubblegum »

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

Post by coffee »

trubblegum wrote: Any other suggestions?
In LOVE tradition "G-Spot" = Graphical SPatial Oriented Technology, lol
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Yet another stateful GUI

Post by trubblegum »

Very nice! I may go with "Gspöt" :megagrin:
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Post by trubblegum »

Now with added text elements, lövingly formatted by the gui.
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Post by trubblegum »

Elements should now be show/hide-able, along with their children (elementlets?).
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Gspöt - formerly Yet another stateful GUI

Post by trubblegum »

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 :monocle:
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Gspöt - formerly Yet another stateful GUI

Post by coffee »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests