Page 4 of 5

Re: GUI libraries...

Posted: Thu Jul 07, 2011 7:42 am
by BlackBulletIV
ishkabible wrote:*rich text input and display
Ouch, that would be one huge pain of a task.

Re: GUI libraries...

Posted: Thu Jul 07, 2011 6:51 pm
by ishkabible
didn't say it would be easy, i would settle for just 1 style input. however, i think at some point i would find myself wanting more.

Re: GUI libraries...

Posted: Thu Jul 07, 2011 11:33 pm
by Robin
When would you ever need rich text editing capabilities, by the way?

Re: GUI libraries...

Posted: Fri Jul 08, 2011 7:11 am
by appleide
I've released my loveui with buttons and textfields.

http://love2d.org/forums/viewtopic.php? ... 404#p33404

Re: GUI libraries...

Posted: Fri Jul 08, 2011 5:10 pm
by RPG
Little example of my idea. UI has style file, widget renderer (based on styles), event system (from lQuery), layouts, that contains and places child elements. There will be horisontal and vertical layouts. Styles like CSS (paddings, margins, border, color, fonts, backgroundImage and so on).

Image
On that screenshot two layouts, one inside other abd two button types: fluid and fixed. Parent layout absolutely positioned, other elements are relatively positioned.
Code of this menu:

Code: Select all

ui = require 'lib.lqueryui'
style = ui.loadStyle('default')
ui.setDefaultStyle('layout', style.layout)
ui.setDefaultStyle('button', style.button)

layout = ui.newLayout(screen):size(600,400):move(100, 100) --main layout
ui.newButton(layout, 'Fluid 1')
ui.newButton(layout, 'Fluid 2')
ui.newButton(layout, 'Fluid 3')
layout1 = ui.newLayout(layout)
ui.newButton(layout1, 'Fixed 1'):setStyle(style.button_fixed)
ui.newButton(layout1, 'Fixed 2'):setStyle(style.button_fixed)

Re: GUI libraries...

Posted: Fri Jul 08, 2011 5:15 pm
by appleide
RPG wrote:Little example of my idea. UI has style file, widget renderer (based on styles), event system (from lQuery), layouts, that contains and places child elements. There will be horisontal and vertical layouts. Styles like CSS (paddings, margins, border, color, fonts, backgroundImage and so on).
loveui has styles like css, events, child elements. The only thing missing is automatic layouts. I think it isn't worth the effort because I think most people would probably like to layout their gui elements manually.

Re: GUI libraries...

Posted: Fri Jul 08, 2011 6:46 pm
by RPG
Ok, looks like I'm not alone in this matter:) This is a good thing - users can choose one of the suitable libraries: pure lua/love+ui or lquery+ui.

Re: GUI libraries...

Posted: Mon Jul 11, 2011 10:07 am
by Nikolai Resokav
I'm currently making a GUI library. I don't really expect it to be that great as I'm not the best coder out there. However, it has been coming along very nicely for the few days that I've been working on it. I don't know if any of you have ever played Garry's Mod (I was a programmer for Garry's Mod before moving on to LÖVE) but basically Garry's Mod is a sandbox mod that runs on the Source Engine and supports Lua scripts. Anyways, The creator of the mod, Garry, wrote a GUI library called DERMA for his mod and that's basically what I'm trying to make my GUI library like. DERMA has almost any GUI element you could ask for and that's what I'm aiming for with my GUI library.

Once I have more work done I may post some screenshots of my progress.

Re: GUI libraries...

Posted: Mon Jul 11, 2011 6:22 pm
by RPG
Can DERMA be easily ported to LOVE?

May be people interested in creating GUI library should join forces and make one great library than dozen of unfinished libraries?

For example, there will be style format, renderer engine and so on each part may be easily integrated into other library. Of course, I make a library which is closely associated with the event system and animations of lquery, and not all people want to use lquery in their projects, but I think there may be two libraries: pure love and lquery based on one style and render system. There will also be easier to add new widgets.

Re: GUI libraries...

Posted: Mon Jul 11, 2011 7:47 pm
by Nikolai Resokav
RPG wrote: Can DERMA be easily ported to LOVE?
I would highly doubt it. I think DERMA has some dependencies on the source engine. Also, I think some parts of DERMA might actually be written in C++.