Page 3 of 41

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 5:58 pm
by Nikolai Resokav
kikito wrote:I like what I'm seeing so far! (and it uses my lib, which is cool!)
Awesome! I'm glad you like it!
kikito wrote: 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
Yeah, a fair portion of the default skin was done in a rush so there are several parts of it that still need optimization. Thanks for reminding me of that, I've been meaning to get around to optimizing it.
kikito wrote: 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.
I'm not quite sure what you mean by this. Löve Frames does have mouse and keyboard input events for it's objects. Could you clarify a bit more?

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 5:59 pm
by TechnoCat
Nikolai Resokav wrote:I'm not quite sure what you mean by this. Löve Frames does have mouse and keyboard input events for it's objects. Could you clarify a bit more?
I'm going to assume he means tabbing or using arrow keys through items in a list and clicking with the "enter" key.

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 6:12 pm
by Nikolai Resokav
TechnoCat wrote:
Nikolai Resokav wrote:I'm not quite sure what you mean by this. Löve Frames does have mouse and keyboard input events for it's objects. Could you clarify a bit more?
I'm going to assume he means tabbing or using arrow keys through items in a list and clicking with the "enter" key.
Ah. If thats the case then he's correct. Thats something I've always considered but I never got around to implementing it. Perhaps I will in a future update.

Re: Löve Frames - A GUI Library

Posted: Mon May 07, 2012 7:17 pm
by Mr.Smith
HI! It's greatest LOVE GUI library i have ever seen :awesome:
I think you may add multiline text editor with scrolling, when the text is beyong the box.
Maybe adding support of quads for interface images can make gui more flexible.
Please, make a list of upcoming features.
Thanks! I wish you inspiration :3

[UPD] Sorry, my bad. Drawing with quads can be maked in draw function. )

Re: Löve Frames - A GUI Library

Posted: Tue May 08, 2012 1:06 am
by Nikolai Resokav
Mr.Smith wrote:HI! It's greatest LOVE GUI library i have ever seen :awesome:
Thanks I'm glad you like it!
Mr.Smith wrote: I think you may add multiline text editor with scrolling, when the text is beyong the box.
I have a multiple line text input object planned for a future update.
Mr.Smith wrote: Please, make a list of upcoming features.
I might add one to the repository or the project page on my website later.

Re: Löve Frames - A GUI Library

Posted: Tue May 08, 2012 2:17 am
by Lap
I've been keeping track of the Love GUI's that have been coming out for years and nothing so far has made me want to switch away from Goo. I ended up adding in a lot of the elements seen in this library, but oh I wish I didn't have to go through the pain of making them.

That being said, this seems to beat the current Goo release. This is the most complete GUI library I have seen as well as one of the best looking. Anyone I see asking for a good GUI I'm probably going to point here. Well done.

Re: Löve Frames - A GUI Library

Posted: Wed May 09, 2012 1:12 am
by Nikolai Resokav
Lap wrote:I've been keeping track of the Love GUI's that have been coming out for years and nothing so far has made me want to switch away from Goo. I ended up adding in a lot of the elements seen in this library, but oh I wish I didn't have to go through the pain of making them.

That being said, this seems to beat the current Goo release. This is the most complete GUI library I have seen as well as one of the best looking. Anyone I see asking for a good GUI I'm probably going to point here. Well done.
Thanks! I've put a lot of work into this library an I'm hoping it will become the go-to library for developers in need of GUIs.

Re: Löve Frames - A GUI Library

Posted: Wed May 09, 2012 11:27 am
by Averice
This look absolutely amazing, awesome work Nikolai ( It makes my GUI look like poo. )

Re: Löve Frames - A GUI Library

Posted: Wed May 09, 2012 2:51 pm
by bartoleo
awesome
it's the best GUI I saw with Love

Re: Löve Frames - A GUI Library

Posted: Wed May 09, 2012 6:01 pm
by Ensayia
This is by far one of the most polished GUI libraries I have seen for LOVE.

If you don't mind, i'll seriously consider using this while making the editor for my game.