more window stuff, still unfinished

This commit is contained in:
airstruck
2015-12-17 16:52:51 -05:00
parent f9924fb028
commit e2602348df
21 changed files with 634 additions and 151 deletions

View File

@@ -1,4 +1,5 @@
local Layout = require 'luigi.layout'
local Backend = require 'luigi.backend'
local window = Layout {
type = 'window',
@@ -10,9 +11,21 @@ local window = Layout {
minheight = 100,
maxwidth = 640,
maxheight = 480,
{ type = 'button', id = 'maximize', text = 'Maximize' },
{ type = 'button', id = 'minimize', text = 'Minimize' },
{ type = 'button', id = 'restore', text = 'Restore' },
}
window.maximize:onPress(function ()
window.root.maximized = true
end)
window.minimize:onPress(function ()
window.root.minimized = true
end)
window.restore:onPress(function ()
window.root.maximized = false
end)
window:show()
require 'luigi.backend'.run()
Backend.run()