Made demo window height larger and added Save/Load/Export buttons

This commit is contained in:
nucular 2014-06-20 14:48:38 +02:00
parent c217c68ea3
commit 593bf96742
2 changed files with 24 additions and 9 deletions

View File

@ -1,6 +1,6 @@
function love.conf(t) function love.conf(t)
t.version = "0.9.0" t.version = "0.9.0"
t.window.width = 640 t.window.width = 640
t.window.height = 480 t.window.height = 600
t.window.title = "sfxr.lua Demo" t.window.title = "sfxr.lua Demo"
end end

View File

@ -237,7 +237,7 @@ function createRandomizers()
playSound() playSound()
end end
f:SetPos(5, 395) f:SetPos(5, 515)
f:SetSize(110, 80) f:SetSize(110, 80)
end end
@ -248,7 +248,7 @@ function createParameters()
local l = lf.Create("list") local l = lf.Create("list")
l:SetSpacing(5) l:SetSpacing(5)
l:SetPadding(5) l:SetPadding(5)
l:SetSize(340, 445) l:SetSize(340, 565)
f:AddItem(l) f:AddItem(l)
@ -334,12 +334,12 @@ function createParameters()
f:SetPos(125, 5) f:SetPos(125, 5)
f:SetSize(350, 470) f:SetSize(350, 590)
end end
function createPlayButton() function createActionButtons()
local f = lf.Create("form") local f = lf.Create("form")
f:SetName("Play") f:SetName("Actions")
local b = lf.Create("button") local b = lf.Create("button")
b:SetText("Play") b:SetText("Play")
@ -354,8 +354,23 @@ function createPlayButton()
playbutton = b playbutton = b
f:AddItem(b) f:AddItem(b)
f:SetPos(485, 425) local b = lf.Create("button")
f:SetSize(150, 50) b:SetText("Save")
b:SetWidth(140)
f:AddItem(b)
local b = lf.Create("button")
b:SetText("Load")
b:SetWidth(140)
f:AddItem(b)
local b = lf.Create("button")
b:SetText("Export WAV")
b:SetWidth(140)
f:AddItem(b)
f:SetPos(485, 455)
f:SetSize(150, 140)
end end
function createOther() function createOther()
@ -515,7 +530,7 @@ function love.load()
createPresetGenerators() createPresetGenerators()
createRandomizers() createRandomizers()
createParameters() createParameters()
createPlayButton() createActionButtons()
createOther() createOther()
wavecanvas = love.graphics.newCanvas(125, 140) wavecanvas = love.graphics.newCanvas(125, 140)