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:
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.
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?
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.
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.
HI! It's greatest LOVE GUI library i have ever seen
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
[UPD] Sorry, my bad. Drawing with quads can be maked in draw function. )
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.
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.