Page 2 of 41

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 6:00 pm
by Nikolai Resokav
Petunien wrote:Very impressive. I like it! :)
Looks really great.
Thanks!
Petunien wrote: This could help a lot if someone is making a level editor.
Hopefully it will help people with things like that and much more! Ultimately I'm hoping that this library will provide an all-in-one solution for anyone who needs a GUI or various GUI elements in their project.

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 6:26 pm
by Nixola
I needed a gui like this, I even started creating one on my own but I couldn't code what I needed, thanks a lot :awesome:

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 6:33 pm
by Nikolai Resokav
Nixola wrote:I needed a gui like this, I even started creating one on my own but I couldn't code what I needed, thanks a lot :awesome:
No problem! I hope it proves useful to you!

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 7:21 pm
by TheP3
Maybe, one small step for you. One big step for the Löve2D community! This is going to help me a lot! Good job!

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 7:54 pm
by linux-man
Please do:
a onclick event on Images
or Buttons with images.

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 8:12 pm
by Nikolai Resokav
TheP3 wrote:Maybe, one small step for you. One big step for the Löve2D community! This is going to help me a lot! Good job!
Thanks! I'm glad to see that you find my library helpful!
linux-man wrote: Please do:
a onclick event on Images
or Buttons with images.
I do have an image button object planned for a future update. It will basically be an image with all of the functionality of the button object.

Re: Löve Frames - A GUI Library

Posted: Sun May 06, 2012 9:28 pm
by SiENcE
It's maybe usefull to develop and include templates for the most know game / utility gui mechanics. This way it's a lot faster for people to understand and adapt this library. I know, it's a lot of work but maybe we all can help and your first sample is very good.

thx

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 4:14 am
by ishkabible
Holy shit this is good!!! so smooth and it looks so nice!

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 3:36 pm
by Nikolai Resokav
SiENcE wrote:It's maybe usefull to develop and include templates for the most know game / utility gui mechanics. This way it's a lot faster for people to understand and adapt this library. I know, it's a lot of work but maybe we all can help and your first sample is very good.

thx
What exactly do you mean by templates?
ishkabible wrote: Holy shit this is good!!! so smooth and it looks so nice!
Hey thanks a lot!

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 4:37 pm
by kikito
I like what I'm seeing so far! (and it uses my lib, which is cool!)

Since you asked for feedback, after a cursory look I found two things:

1. Repetition in skins.lua:

Code: Select all

local framefont = love.graphics.newFont(10)
local buttonfont = love.graphics.newFont(10)
local progressbarfont = love.graphics.newFont(10)
...
local checkboxfont = love.graphics.newFont(10)
local columnlistheaderfont = love.graphics.newFont(10)
That's a lot of unnecessary allocations, since love.graphics.newFont isn't memoized (I think). This is equivalent, but faster and less memory-hungry:

Code: Select all

local font = love.graphics.newFont(10)
local framefont = font
local buttonfont = font
...
This also makes the code more DRY - if someone wants to change the font in all controls, they can do it in one single place.
Something similar happens with the colors: there is repetition.

Code: Select all

skin.controls.button_border_down_color				= {143, 143, 143, 255}
skin.controls.button_border_nohover_color			= {143, 143, 143, 255}
skin.controls.button_border_hover_color				= {143, 143, 143, 255}
I'd rather have the repeated colors set up in one variable, like this:

Code: Select all

 local secondaryColor = {143, 143, 143, 255}
...
skin.controls.button_border_down_color				= secondaryColor
skin.controls.button_border_nohover_color			= secondaryColor
skin.controls.button_border_hover_color				= secondaryColor
2. I might have missed it, but I think there is no way to interact with this via keyboard/pad, right? You kinda need the mouse. If not, consider this a feature request.

That's all for now - mostly minor picks. Well done!