Moved some things around and changed play text

This commit is contained in:
nucular 2014-06-20 15:03:24 +02:00
parent 593bf96742
commit af2f3de4f4

View File

@ -162,7 +162,7 @@ function playSound()
if sounddata then if sounddata then
source = love.audio.newSource(sounddata) source = love.audio.newSource(sounddata)
source:play() source:play()
playbutton:SetText("Stop") playbutton:SetText("Stop Playing")
playing = true playing = true
end end
end end
@ -342,7 +342,7 @@ function createActionButtons()
f:SetName("Actions") f:SetName("Actions")
local b = lf.Create("button") local b = lf.Create("button")
b:SetText("Play") b:SetText("Generate and Play")
b:SetWidth(140) b:SetWidth(140)
b.OnClick = function(o) b.OnClick = function(o)
if not playing then if not playing then
@ -354,23 +354,27 @@ function createActionButtons()
playbutton = b playbutton = b
f:AddItem(b) f:AddItem(b)
local b = lf.Create("button") local sb = lf.Create("button")
b:SetText("Save") sb:SetText("Save")
b:SetWidth(140) sb:SetWidth(67)
f:AddItem(b) f:AddItem(sb)
local b = lf.Create("button") local lb = lf.Create("button")
b:SetText("Load") lb:SetText("Load")
b:SetWidth(140) lb:SetWidth(67)
f:AddItem(b) f:AddItem(lb)
local b = lf.Create("button") local eb = lf.Create("button")
b:SetText("Export WAV") eb:SetText("Export WAV")
b:SetWidth(140) eb:SetWidth(140)
f:AddItem(b) f:AddItem(eb)
f:SetPos(485, 455) f:SetPos(485, 485)
f:SetSize(150, 140) f:SetSize(150, 110)
-- well ugh
lb:SetPos(78, 47)
eb:SetY(77)
end end
function createOther() function createOther()
@ -419,7 +423,7 @@ function createOther()
s:SetValue(sound.volume.sound) s:SetValue(sound.volume.sound)
f:AddItem(s) f:AddItem(s)
f:SetPos(485, 185) f:SetPos(485, 370)
f:SetWidth(150) f:SetWidth(150)
@ -446,7 +450,7 @@ function createOther()
f:AddItem(t) f:AddItem(t)
statistics.durationtext = t statistics.durationtext = t
f:SetPos(485, 300) f:SetPos(485, 185)
f:SetWidth(150) f:SetWidth(150)
end end
@ -546,7 +550,7 @@ function love.update(dt)
if source then if source then
if playing and not source:isPlaying() then if playing and not source:isPlaying() then
playing = false playing = false
playbutton:SetText("Play") playbutton:SetText("Generate and Play")
end end
end end
end end