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 » Wed Mar 07, 2012 11:39 am

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 995 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 » Wed Mar 07, 2012 12:05 pm

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 » Wed Mar 07, 2012 12:36 pm

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 » Wed Mar 07, 2012 12:43 pm

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 » Wed Mar 07, 2012 1:02 pm

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 » Wed Mar 07, 2012 1:09 pm

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 » Wed Mar 07, 2012 2:44 pm

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 » Wed Mar 07, 2012 4:48 pm

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 » Fri Mar 09, 2012 2:13 am

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 » Fri Mar 09, 2012 9:48 am

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: Google [Bot], tadamson and 1 guest