Gspöt - retained GUI lib

Showcase your libraries, tools and other projects that help your fellow love users.
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 »

Thanks for that.
- Fixed a stray call to gui.button() in example code.
- Added show/hide example.
- Constrained scrollbar handle to visible scrollbar area.
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 »

- Optimised mouse checks with withinrect({x, y, ...}, {x, y, w, h, ...})
- Set cursor to only display when input element has focus, and blink enticingly.
- Added bonus withinradius({x, y, ...}, {x, y, r, ...}) and invisible radius element, which accepts an additional parameter r in its pos table, although the gui does nothing with them for now.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Gspöt - formerly Yet another stateful GUI

Post by josefnpat »

Consider adding a limit on the text input field (e.g. chat in the love file) or somehow stopping it from going to far.

Perhaps, start truncating the start of the line while accepting new input:
EhM6k.png
EhM6k.png (4.14 KiB) Viewed 818 times
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
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 »

Good call.
Done and updated.

Edit : also improved constraint of tooltips

Someone mentioned that the default appearance of the gui is very similar to that of vrld's quickie lib, and I might be seen as copy-cat-ing (new verb for you lol).
There is a good reason for this - one of the first things that attracted me to quickie was its clean cut-down look and feel. I learned a lot from playing with it, but I found that what I needed for my project was something I was going to have to do for myself, and figured I might as well share.
There is quite a substantial difference between the two, however, and I certainly don't want to take anything away from vrld or his most excellent contribution.
In fact, I think there could even be an advantage to the coder in having few visual distinctions between choices - that being that he will select the library which best suits him in terms of functionality and implementation, rather than on a basis of what looks pretty.
It might also be noted that quickie offers more in terms of visual customization, with custom draw functions, which Gspot, for the present at least, does not support.
I won't be changing the default look of Gspot, at least for a while, as I'm developing it alongside the app which implements it, so it has the visual effect I want for the app, and changing it back and forth with every update would be rather a pain, but I want you all to know that a measure of the credit for this project goes to quickie and its creator, vrld, even though he might not know it.

Hope that puts that one to bed. Thanks for listening - see you at the next update :)
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Gspöt - formerly Yet another stateful GUI

Post by josefnpat »

I also noticed one thing is a lack of key repeat.

Maybe use some of this?

https://love2d.org/wiki/love.keyboard.getKeyRepeat

Also, I checked this thread and the contents of the .love. What are you planning on releasing this under? zlib/libpng license like love maybe?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
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 »

I could reconsider key repeating. My current thinking is that :
1. It sure is annoying as hell when you've forgotten to unfocus chat in an online game, and ended up filling it with "wwwwwwwwwwwaaassssswaswsws" - not just for the player, but for others who get hit with it in chat.
2. Spammers do it deliberately.
Only repeating backspace and delete might be an option, or a shift or mouse driven range selection, but I'm not keen on spam (I know, right? :? ), so I don't see any reason to go to any lengths to encourage it.

Licensing isn't really something I've thought about at all, to be honest. I know I should have, but I don't know all that much about it, and for now I'd just love to see if and how people might use it. I'll have a search on the forum for "pulleys, magnets, and other licensing mumbo-jumbo", and see what I can figure out. As for "release" :megagrin: well, the code is right there, no-one can stop you using it. I posted it both to get feedback, and see what funky stuff others might be able to do with it, so have a ball, just don't claim the credit, because I can't even do that - I owe a lot of it to the löve community.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Gspöt - formerly Yet another stateful GUI

Post by bartbes »

trubblegum wrote:As for "release" :megagrin: well, the code is right there, no-one can stop you using it.
Lawyers. Which brings us back to licensing :P.
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 »

So in a nutshell what you're saying is : math.sqrt(math.atan2(smoke, mirrors))
If my maths are right, I need to come up with a license in order for anyone to be able to use it without fear of me trying to sue them?

Update : Couple of minor improvements in code and examples
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 »

I pasted in the Zlib/libpng from opensource.org
Does that make everything OK? :oops:

PS : If my lines of code are longer than the lines in a legal document, does that make me a bad person?
User avatar
pk
Citizen
Posts: 67
Joined: Wed Dec 14, 2011 2:13 am
Location: Texas, United States
Contact:

Re: Gspöt - formerly Yet another stateful GUI

Post by pk »

zlib is :thumbsup:

Licensing is a necessary burden. Using the same license as LOVE is a great choice IMO.
ALL CREATURE WILL DIE AND ALL THE THINGS WILL BE BROKEN. THAT'S THE LAW OF SAMURAI.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests