Löve Frames - A GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post 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.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Löve Frames - A GUI Library

Post 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:
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post 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!
User avatar
TheP3
Citizen
Posts: 62
Joined: Tue Dec 20, 2011 9:20 pm

Re: Löve Frames - A GUI Library

Post 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!
I write rules for my computer... I'm not the ruler of the world(yet)... Also, I livestream stuff http://NateAGeek.com/Live
linux-man
Citizen
Posts: 67
Joined: Thu Apr 28, 2011 4:51 pm

Re: Löve Frames - A GUI Library

Post by linux-man »

Please do:
a onclick event on Images
or Buttons with images.
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post 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.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Löve Frames - A GUI Library

Post 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
User avatar
ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

Re: Löve Frames - A GUI Library

Post by ishkabible »

Holy shit this is good!!! so smooth and it looks so nice!
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post 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!
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Löve Frames - A GUI Library

Post 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!
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: No registered users and 141 guests