Please write examples of code, which you would like to use to create the GUI. This will help me with the creation of the library (in any case I'm going to develop GUI system based on lQuery).
GUI library should contain:
1. Styles - everyone wants to create his own GUI style, styles must be easy to understand (CSS is a good example)
2. Event system (lQuery already has event system), actions and callbacks.
3. Widgets - buttons, textboxes, etc.
4. Layouts - to place widgets in order, to align widgets (like QT layouts). It's easier than manually alignment.
There is problem with scrolling widgets - there is no way to do it except framebuffers. But framebuffers may be slow.
GUI libraries...
Re: GUI libraries...
I'm incredibly tempted to take a shot at this myself, as I am one of the few forum members who has contributed very little here.
Re: GUI libraries...
You want to create your own GUI library? Perhaps forum users should join forces?
Re: GUI libraries...
I meant I was incredibly tempted to create and share my own version of an easy to use GUI for the community.
Re: GUI libraries...
ok, this is my vision of GUI lib:
Styles:
Create widgets:
Styles:
Code: Select all
class button {
border = 1
border_color = {0, 0, 0}
color = {128,128,128}
}
class button : hover {
color = {64,64,64}
}
class layout {
border = 3
border_color = {64,64,64}
}
class text_input {
background = "images/background.png"
}
Code: Select all
layout = Entity:new(screen):newLayout({layout = "horisontal", align = "center", valign = "top", padding = 10}):size(800, 600):style("layout")
--buttons
Entity:new(layout):newButton("New game"):size(100, 30):click(newGame):style("button")
Entity:new(layout):newButton("Load game"):size(100, 30):click(loadGame):style("button")
Entity:new(layout):newButton("Quit"):size(100, 30):click(love.exit):style("button")
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: GUI libraries...
Being able to style widgets is all well and good, but 99 times out of 100, I'm going to want to use images rather than just crude background color + border.
Re: GUI libraries...
Also may be:RPG wrote:Code: Select all
class text_input { background = "images/background.png" }
Code: Select all
class text_input {
border_image = ("images/background.png", 10,10,10,10}
}
lQuery can help you to display border-image.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: GUI libraries...
Guys. You do know that's not valid Lua, right?
Help us help you: attach a .love.
Re: GUI libraries...
Code: Select all
class.text_input = {
background = "images/background.png"
}
Re: GUI libraries...
I don't understand the need to implement something like this in lQuery anyway. Is it really necessary to use a framework (lQuery) on top of another framework (LOVE) for doing a GUI? This sort of thing will be inherently difficult for a newbie to grasp.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests