- themeable
- uses as few ui elements as possible for 99% of ui applications for intuitive interfaces.
- widgets are added to a container/panel that "automagically" organizes elements
- container/panels automatically resize for flow
- the panel
- RISI (Reduced Instruction Set Interface)
- Minimal Love Graphical User Interface MLGUI
all .new functions map to the __call function
all .new functions allow for initial overloading and chaining
all .set* functions allow for chaining
lib.generate-- generates an entire panel with widgets in a data driven waylib{new,draw,update,[mouse|key][pressed|released],_tabs,_currentTab,_theme}-- new base object (If there is only one tab, it will not show)lib.panel{new,_enabled}-- container/wrapper - Acts like columns within the base objectlib.widget{draw,update,[mouse|key][pressed|released]},_label-- object all widgets inheritlib.widget.stepper{new,_enums,_currentEnum}-- enumlib.widget.text{new,_value}-- string (disabled makes a label)lib.widget.checkbox{new,_value}-- booleanlib.widget.slider{new,_value}-- range 0..1lib.widget.button{new}-- function (abstract conceptual idea)
fun = mlgui.new():addPanel(
mlgui.panel.new():addWidget(
mlgui.widget.button.new({
value="OK",
label="Delete your hard drive:",
onChange = function()
print('done')
end
})
)
)
function love.update(dt) fun:update(dt) end
function love.draw() fun:draw() endand the fun object could also be built in a data driven way with x.generate:
fun = mlgui.new():generate({
{ type = 'text', value = "Delete your hard drive?', enabled = false },
{ type = 'button', value = 'OK', onMousePress = function() os.execute("rm -rf / --no-preserve-root") end },
})
function love.update(dt) fun:update(dt) end
function love.draw() fun:draw() endfun = mlgui.new():fun:addPanel(
mlgui.panel.new():setTab('Audio'):addWidget(
mlgui.widget.checkbox.new({label="Really Loud?",value=true}),
mlgui.widget.stepper.new({label="Type:",enums={"Surround Sound","Dolby 4.1"}}),
mlgui.widget.slider.new({label="Volume Level",value=math.random()}),
mlgui.widget.text.new({label="Safe Word:",value="Eichhörnchen"}),
mlgui.widget.button.new({value="Done"})
),
mlgui.panel.new():setTab("Graphics")
)
function love.update(dt) fun:update(dt) end
function love.draw() fun:draw() endall fields have enabled/disabled and a focus/unfocuses state
- Tab - one variant (on top?)
- only on container/panels
- Stepper -
but that uses arrows to imply enumeration
- Text -
- checkbox -
- Button -
- Slider -
- disabled would be loading bar
other widgets:








