I know, I know, there are half a dozen gui thingys already made for love. But you see, this new one is made before all of them! It was made for a different lua game engine; I just ported it.
It's still in development, see comments in source for documentation. Hope you can improve it so I can steal back your changes! (same license as LOVE)
This gui's "ace" is you can have widgets all over each other and it would still work perfectly as expected by a human user. (or is supposed to!) see demo.
The textfield is a bit iffy though; set_key_repeat is not in love and I haven't done it by myself either; and I have only done some of the shifting of keys and capslock isn't done yet. (dunno why love doesnt do this auto...)
I was also lazy and relied on setscissor too much (rather than just calling less draw commands) for the textfield so it slows the computer down as strings get longer. love havent implemented scrap so cannot copy and paste either :<
p.s Where's that lua game engine, you ask? Well I was working on it by myself before I knew about love half a year ago. but when I stumbled upon love I realised alot of the work has already been done, i'd only need to compile love for mac os x, so I jumped ship!
(I only ported this because I want to use something soon and I can't find downloads of any other guis with textfields implemented...)
Tainted gui
Tainted gui
- Attachments
-
- Tainted.zip
- demo+source w/comments - documentation
- (22.86 KiB) Downloaded 454 times
Re: Tainted gui
Good work!
But...
- Can you please release your work under free licence like GPL or zlib ? (you can read this post)
- Why do you start/end your lua file by "do"/"end" is it really usefull ?
Best Regards,
But...
- Can you please release your work under free licence like GPL or zlib ? (you can read this post)
- Why do you start/end your lua file by "do"/"end" is it really usefull ?
Best Regards,
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Tainted gui
Game could not be loaded.
This is when I love the extracted Tainted/
Also: Does OSX not have case-sensitivity? main.lua says Stars.lua but the file is stars.lua.
This is when I love the extracted Tainted/
Also: Does OSX not have case-sensitivity? main.lua says Stars.lua but the file is stars.lua.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Tainted gui
Finally. Something I can work with.
Thank you! <3
Thank you! <3
Re: Tainted gui
TsT wrote:Good work!
But...
- Can you please release your work under free licence like GPL or zlib ? (you can read this post)
- Why do you start/end your lua file by "do"/"end" is it really usefull ?
Best Regards,
It's still in development, see comments in source for documentation. Hope you can improve it so I can steal back your changes! (same license as LOVE)
by using do/end I can keep variables local and not fill the global namespace too much. local variables are also faster to access.
@qubodup: Sorry I changed file names at the last second and got careless; Yes, mac os x disks aren't case sensitive
Re: Tainted gui
I'd like a better name than "tainted"... Suggestions please!
I've fixed a bug with the textfield, and made it not slow down when there are more text inside.
Probably will do a multiline text view to display text but I will not make it editable, yet.
Will add scrollbars.
There are some more easy stuff I might do too. checkboxes, radio buttons, popup menus. Just need good images for these. (and probably new one for buttons.)
I might add a table view too.
I'll go on a plane tomorrow so will be away for some days though.
I've fixed a bug with the textfield, and made it not slow down when there are more text inside.
Probably will do a multiline text view to display text but I will not make it editable, yet.
Will add scrollbars.
There are some more easy stuff I might do too. checkboxes, radio buttons, popup menus. Just need good images for these. (and probably new one for buttons.)
I might add a table view too.
I'll go on a plane tomorrow so will be away for some days though.
- Attachments
-
- Tainted.zip
- (23.41 KiB) Downloaded 359 times
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Tainted gui
BFF (Buttons, Fields & Fun)appleide wrote:I'd like a better name than "tainted"... Suggestions please!
Um, will you fix the case thing? Or is the demo not *supposed* do run?
PS: Oh, I didn't see the attachment and didn't try it yet. Whops.
Please use version number btw.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Tainted gui
@qubodup: can you download this and see if it runs?
I've reverted to my previous method of offsetting text field. It has much cleaner code.
Implemented standard setters and getters. reference:
I've reverted to my previous method of offsetting text field. It has much cleaner code.
Implemented standard setters and getters. reference:
Code: Select all
Reference
All Widgets:
public variables:
note: These functions are run when triggered
mousepressed, of type: function(self, x, y, button)
mousereleased, of type: function(self, x, y, button)
keypressed, of type: function(self, key)
methods:
getx()
setx(number)
gety()
sety(number)
getwidth()
setwidth(number)
getheight()
setheight(number)
getvisible()
setvisible(boolean)
getfont()
setfont(font)
gettextcolor()
settextcolor(color)
getvalue()
setvalue(generic)
getfocused()
getenabled()
setstyle(string)
example: button.applyStyle("x:200;y:50;width:300;visible:false")
note: works only if value is number, boolean or string that isn't either of those
Context:
methods:
Button(id, x, y, label)
creates button
Context(id, x, y, w, h)
creates sub-context; 0 means infinite for w and h
TextField(id, x, y)
creates textfield
getElementById(string)
gets widget in context by id
byId(string)
same as getElementById
out(string)
outputs text onto screen
focused(widget)
checks if widget is focused
- Attachments
-
- Tainted(02122008).zip
- (24.75 KiB) Downloaded 400 times
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Tainted gui
Pardon the delay, for only now I 'ave a LOVE binary compiled.appleide wrote:@qubodup: can you download this and see if it runs?
It runs. Is it supposed to look like following image?
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Tainted gui
umm.... if your monitor is black and white, that is... :/ can you look inside the .love to see if the images are blue? I think the images are not loaded,...
Who is online
Users browsing this forum: Google Adsense [Bot] and 1 guest