diff options
| -rw-r--r-- | assets.lua | 2 | ||||
| -rw-r--r-- | assets/attacktortoise.ogv | bin | 0 -> 833023 bytes | |||
| -rw-r--r-- | files.lua | 7 | ||||
| -rw-r--r-- | var.lua | 3 | ||||
| -rw-r--r-- | viewer.lua | 17 | ||||
| -rw-r--r-- | window.lua | 4 |
6 files changed, 33 insertions, 0 deletions
@@ -232,6 +232,8 @@ function loadAssets(id) expl.deb[3].pic = love.graphics.newImage("assets/debris3.png") end if id == 16 then + video = {} + video.attacktortoise = love.graphics.newVideo("assets/attacktortoise.ogv") loadVar() end if id == 17 then diff --git a/assets/attacktortoise.ogv b/assets/attacktortoise.ogv Binary files differnew file mode 100644 index 0000000..64fbb16 --- /dev/null +++ b/assets/attacktortoise.ogv @@ -84,6 +84,13 @@ function updateFiles() end openFileWindow(7) elseif files == f.videos then + if i == 1 and vplay.v ~= video.attacktortoise then + if vplay.v ~= 0 then + vplay.v:stop() + end + vplay.v = video.attacktortoise + vplay.p = true + end openFileWindow(8) elseif files == f.music then if i == 1 and mplay.m ~= music.chill then @@ -263,6 +263,9 @@ function loadVar() mplay.pr = false mplay.title = "Nothing" mplay.bar = {} + vplay = {} + vplay.v = 0 + vplay.p = false end function loadPre() love.graphics.setDefaultFilter("nearest", "nearest") @@ -5,6 +5,13 @@ function drawPicture() end end function drawVideo() + drawDownBox(8, 31, win[8].w-16, win[8].h-82, 4) + love.graphics.setColor(20,20,20) + love.graphics.rectangle("fill",8,31,win[8].w-16,win[8].h-82) + drawControls(8+38,win[8].h-34-8) + if vplay.v ~= 0 then + love.graphics.draw(vplay.v,8,31) + end end function drawMusic() drawDownBox(8,31,win[9].w-17,win[9].h-82,4) @@ -45,6 +52,16 @@ function drawControls(x,y) drawUpBox(x-38,y,32,32,2) love.graphics.draw(but.back, x-38, y) end +function updateVideo() + if vplay.p == true and vplay.v ~= 0 then + vplay.v:play() + win[8].update = true + end + if win[8].ex == true and vplay.v ~= 0 then + vplay.v:stop() + vplay.v = 0 + end +end function updateMusic() if mouseClick(win[9].x+8+38,win[9].y+win[9].h-34-8,32,32) == true and mplay.m ~= 0 and mplay.pr == false then if but.but == but.pause then @@ -30,6 +30,8 @@ function drawWindow(id) drawPicture() elseif id == 9 then drawMusic() + elseif id == 8 then + drawVideo() end love.graphics.setCanvas() win[id].update = false @@ -182,6 +184,8 @@ function drawWindow(id) updateFiles() elseif id == 9 then updateMusic() + elseif id == 8 then + updateVideo() end if id == layer[1] and win[id].bar == "grey" then win[id].bar = "active" |
