Page 2 of 4

Re: Leif GUI library

Posted: Sat Nov 15, 2008 4:49 am
by Dvondrake
---

Re: Leif GUI library

Posted: Sat Nov 15, 2008 10:48 pm
by u9_
I think it is great there are several different GUIs. I am sure each will have its advantage over the next, or some will prevail and others will wither away and die ;)

Re: Leif GUI library

Posted: Wed Nov 19, 2008 12:54 pm
by Kuromeku
Kaze, do you mind if I made Leif GUI a part of ËNVY when you're done? It really needs a GUI library and it seems to be stupid to attempt one now that such a good one has been made.

Full credit where due, of course.

Re: Leif GUI library

Posted: Wed Nov 19, 2008 10:45 pm
by Kaze
Kudomiku wrote:Kaze, do you mind if I made Leif GUI a part of ËNVY when you're done? It really needs a GUI library and it seems to be stupid to attempt one now that such a good one has been made.

Full credit where due, of course.
Of course. Once it's finished, anyone is free to use it.

Re: Leif GUI library

Posted: Mon Nov 24, 2008 5:57 pm
by Kaze
We decided to use Mike's suggestion, and (attempt) to use CSS for styling the GUI. Updates soon.

Re: Leif GUI library

Posted: Mon Nov 24, 2008 6:15 pm
by qubodup
Kaze wrote:We decided to use Mike's suggestion, and (attempt) to use CSS for styling the GUI. Updates soon.
Sounds like suicide (considering how spastic the browser hood is), but I'm really interested to see this work! :)

Re: Leif GUI library

Posted: Tue Nov 25, 2008 10:48 pm
by Kaze
qubodup wrote:
Kaze wrote:We decided to use Mike's suggestion, and (attempt) to use CSS for styling the GUI. Updates soon.
Sounds like suicide (considering how spastic the browser hood is), but I'm really interested to see this work! :)
Sorry qubodup; we decided to not use CSS. What's the point in writing a parser for CSS when we're only using it for some simple variables? We'll use a Lua script instead :D .
Example:

Code: Select all

Leif.styles = {
	class = {
		awesome = {
			background = {
				color = love.graphics.newColor( 0x22, 0x22, 0x22, 0xFF )
			},
			type = "roundedBox"
		}
	},
	
	element = {
		frame = {
			border = { size = 1, color = love.graphics.newColor( 0, 0, 0, 255 ) },
			background = { color = love.graphics.newColor( 0xEE, 0xEE, 0xEE, 255 ) },
			type = "rectangle"
		}
	},
	
	default = {
		border = { size = 1, color = love.graphics.newColor( 0, 0, 0, 255 ) },
		background = { color = love.graphics.newColor( 255, 255, 255, 255 ) },
			type = "rectangle"
	}
	
}
The "class" part is for style "classes", so it's possible to use a different style on the same element ( :applyClassStyle("awesome"), as well as applyStyle{background.. etc} )

Re: Leif GUI library

Posted: Thu Dec 18, 2008 3:19 am
by Kaze
We haven't been working much on Leif (Fear not, this post gets better).
The previous OP was 0.1: Inconsistent code and function names, extremely messy, and inefficient.. and somewhat ugly~ :cry:
0.2: Complete rewrite by me (Dr. Magnusson gave up on the project). :(
0.3: Added Styles, rewrote the panels, added more functions to the base panel. :P

So we went through 3 versions without actually releasing it, awesome right? :roll:

I'm starting to get lazy here, so I'm releasing it without making any awesome panels, the only ones are: frame, label, button, and input. :D
It's up to the community to make more, and if they wish, it'll be added to the project.

New screenshots, and *a download link* has been added to the OP. :o

Re: Leif GUI library [Released]

Posted: Fri Dec 19, 2008 12:38 am
by osgeld
i think this is what ive been looking for

actually its pretty close to what i had started designing (on paper) last week

ill be pleased to give it a test run over the weekend

thanks!

Re: Leif GUI library [Released]

Posted: Fri Dec 19, 2008 2:13 pm
by Ripe
I tried implementing this into my client/server example for a simple login screen but for some reason it seemed clear the screen (everything but the GUI) every time I used leif:draw(). Did you make it do this or is this something I'm doing wrong?