mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-22 14:53:00 +00:00
adds very simple proof of concept buttons
This commit is contained in:
parent
9bdb928668
commit
ac8015b2f0
|
@ -8,6 +8,9 @@ local status
|
|||
|
||||
local C = Class:extend()
|
||||
|
||||
local layout = Luigi(require 'layout')
|
||||
layout:setStyle(require 'style')
|
||||
|
||||
function C:setup()
|
||||
Terebi.initializeLoveDefaults()
|
||||
screen = Terebi.newScreen(320, 240, 2)
|
||||
|
@ -38,6 +41,7 @@ end
|
|||
|
||||
function C:draw()
|
||||
screen:draw(_draw)
|
||||
layout:show()
|
||||
end
|
||||
|
||||
function C:setStatus(text)
|
||||
|
|
44
src/layout.lua
Normal file
44
src/layout.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
return { id = 'window',
|
||||
{ flow = 'y',
|
||||
{ height = 360 },
|
||||
{ flow = 'x',
|
||||
{ width = false },
|
||||
{
|
||||
type = 'button',
|
||||
id = 'exampleButton',
|
||||
text = 'Press me!',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{
|
||||
type = 'button',
|
||||
id = 'exampleButton2',
|
||||
text = 'Press me',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{
|
||||
type = 'button',
|
||||
id = 'exampleButton3',
|
||||
text = 'Press me',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{
|
||||
type = 'button',
|
||||
id = 'exampleButton4',
|
||||
text = 'Press me',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{
|
||||
type = 'button',
|
||||
id = 'exampleButton5',
|
||||
text = 'Press me',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{ width = false }
|
||||
}
|
||||
}
|
||||
}
|
8
src/style.lua
Normal file
8
src/style.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
panel = {
|
||||
background = {0,0,0,0}
|
||||
},
|
||||
button = {
|
||||
align = 'centre middle'
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue