Leif GUI library

Showcase your libraries, tools and other projects that help your fellow love users.
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Re: Leif GUI library

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:21 pm, edited 1 time in total.
u9_
Citizen
Posts: 54
Joined: Thu Oct 23, 2008 7:12 am

Re: Leif GUI library

Post 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 ;)
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: Leif GUI library

Post 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.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Leif GUI library

Post 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.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Leif GUI library

Post by Kaze »

We decided to use Mike's suggestion, and (attempt) to use CSS for styling the GUI. Updates soon.
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Leif GUI library

Post 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! :)
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)
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Leif GUI library

Post 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} )
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Leif GUI library

Post 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
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Leif GUI library [Released]

Post 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!
Ripe
Prole
Posts: 11
Joined: Wed Nov 19, 2008 3:28 pm
Location: Australia

Re: Leif GUI library [Released]

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests