Page 15 of 41

Re: Löve Frames - A GUI Library

Posted: Mon Jul 22, 2013 4:22 pm
by OmarShehata
riidom wrote:if you see the documentation, check the "base" object, it has a ton of methods, all other objects inherit from, and thus not described there. In this list, you will find :Remove().
Took me a while to discover myself :)
Oh! Thanks! :D

Re: Löve Frames - A GUI Library

Posted: Thu Aug 22, 2013 4:16 pm
by szensk
I don't have a github account so

starting at line #693 in objects/textinput.lua

Code: Select all

if loveversion == "0.9.0" then
	unicode = string.byte(unicode)
end
what about nil unicode? (ie a function key)

Code: Select all

if loveversion == "0.9.0" then
	unicode = unicode and string.byte(unicode) or -1
end
Or the 'else' on line 691 it should be

Code: Select all

elseif unicode then

Re: Löve Frames - A GUI Library

Posted: Fri Aug 23, 2013 2:25 am
by Nikolai Resokav
szensk wrote:I don't have a github account so

starting at line #693 in objects/textinput.lua

Code: Select all

if loveversion == "0.9.0" then
	unicode = string.byte(unicode)
end
what about nil unicode? (ie a function key)

Code: Select all

if loveversion == "0.9.0" then
	unicode = unicode and string.byte(unicode) or -1
end
Or the 'else' on line 691 it should be

Code: Select all

elseif unicode then
Thanks for the report. I'll fix that in the next update.

Re: Löve Frames - A GUI Library

Posted: Fri Aug 23, 2013 6:09 am
by killer64
verry nice, i made a lovely UI to control my stargates (SGCraft + CC)
Image

Re: Löve Frames - A GUI Library

Posted: Sat Sep 07, 2013 7:55 am
by ncarlson
Excellent library!

Just wanted to say thanks for the continued updates.

Re: Löve Frames - A GUI Library

Posted: Wed Sep 11, 2013 3:00 pm
by ixjf
I am porting this library (and eventually re-writing most of it to meet my needs) for Multi Theft Auto and I came across something which I don't understand:

Code: Select all

local height = font:getHeight(curline:sub(i, i))
on file textinput.lua (I don't know the exact line because I have modified the file already). On Love2D wiki, getHeight method does not have any parameters. What's this?

Re: Löve Frames - A GUI Library

Posted: Wed Sep 11, 2013 3:08 pm
by Robin
It's the same. Functions in Lua ignore extra arguments, just like arguments you don't pass become nil.

Re: Löve Frames - A GUI Library

Posted: Wed Sep 11, 2013 3:15 pm
by Eamonn
As I think everyone in this thread has said, this library is excellent. It's better then excellent. You can't describe how excellent it is!

I'm writing some basic helper methods, which makes life a lot easier. It's really easy to do stuff like that, and it's really easy to design your own UI, as a poster above showed. It's just incredible! :D Thanks for making it!

Re: Löve Frames - A GUI Library

Posted: Wed Sep 11, 2013 3:17 pm
by ixjf
Robin wrote:It's the same. Functions in Lua ignore extra arguments, just like arguments you don't pass become nil.
I know that. I had an idea it'd probably be that it's unnecessary, just like in many functions of this library I saw parameters which are never used but I thought there was an explanation for it.

Re: Löve Frames - A GUI Library

Posted: Wed Sep 11, 2013 4:23 pm
by Robin
Okay. I guess some people become confused because [wiki]Font:getWidth[/wiki] does take an argument?