Page 1 of 1

bdGui

Posted: Thu Nov 13, 2008 10:38 am
by An00biS
mystadio, on 'lGUI ( name pending )' thread wrote:My father always said: "When you've got a idea, one person somewhere around the globe just got it too."
Seems that way.

I've been working on a gui-related toolkit. I'm creating a game for love (currently in pre-pre alpha stage) and since there was no gui library around here, I started making my own.

Actually, it's not really a gui toolkit, because there are no 'buttons' or ''. There is only one root element (called desk) and one hierarchical element (called sheet) - a rectangle which can serve as a window, panel, button, scrollbar, whatever.It has built-in layout capabilities: It can be moved and resized, it can be anchored around specified edge, its position can be absolute or relative to it's parent and its scaling can be fixed or relative. It also supports callback functions. However, it has no built-in drawing functions (though the library provides one) and it's nothing but a plain rectangle - if it's supposed to do more, the user has to code the extra functionality. I designed the toolkit this way because there are hundreds of ways to make game interface and it doesn't always incude floating windows.

Now, I'm eager to get some feedback on my work. The attachment contains the library (currently in 'unmarked beta' stage - mess in comments and names, public internals, less than tested...) and also a test love script with two functions test1() and test2(). Just uncomment the one you want to try.

So, how about it?

Re: bdGui

Posted: Thu Nov 13, 2008 2:41 pm
by mike
It works well (haven't looked at the code), so perhaps you and http://love2d.org/forum/viewtopic.php?f=5&t=257 can work together to make the most epic GUI library LÖVE has ever seen?

Re: bdGui

Posted: Thu Nov 13, 2008 9:31 pm
by nightvenom
I'd like that, wouldnt want any, wars between the 3 different gui's -.-

Re: bdGui

Posted: Fri Nov 14, 2008 12:34 am
by Borsty
I don't think there will be wars. Your scrolling thing is really nice, I didn't come around making my gui resizeable, but it's planned.. sometime xD

Everyone's lib will be unique, some will prefer the one, other will prefer a different one :)

Re: bdGui

Posted: Fri Nov 14, 2008 12:54 am
by mike
Borsty wrote:I don't think there will be wars. Your scrolling thing is really nice, I didn't come around making my gui resizeable, but it's planned.. sometime xD

Everyone's lib will be unique, some will prefer the one, other will prefer a different one :)
Yes, of course... choice is a good thing but to degrees. Too much choice can often lead to confusion, especially for new users (just look at how apprehensive people were towards moving to Linux until Ubunty came along and became the only choice for newbs). I, personally, feel that LÖVE is too small to warrant a "choice war". I feel that you should work together, but if you don't want to then I completely understand. God knows I hate doing things any other way than my own.

*goes back to building a forum from scratch*

Re: bdGui

Posted: Fri Nov 14, 2008 1:27 am
by An00biS
Borsty wrote:I didn't come around making my gui resizeable, but it's planned.. sometime xD
In that case, I think you could make a good use of my lib, because it was designed to provide movable and scalable containers for higher-level gui elements. Just check out the sheet component, it stores its size in .w and .h attributes and its screen (absolute) position in .absolutePos.x and .absolutePos.y. There is also .getCorners() method which returns the corners in love.gui.polygon()-friendly format (x1,y1,x2,y2...). It's invisible, it has no built-in drawing functions.

Now i realize that I really should write some doc for my lib, so it's purpose is more visible. :oops: It does have 'gui' in its name, but it's not a regular toolkit. I may add some extensions to it, but they will definitely be optional and built upon the current content.

Re: bdGui

Posted: Fri Nov 14, 2008 10:43 pm
by farvardin
I hadn't congratulated this guy for his gui yet.
This one looks pretty too, and we have a demo at least. I like it.