mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-19 02:16:43 +00:00
more window stuff, still unfinished
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user