aboutsummaryrefslogtreecommitdiff
path: root/viewer.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-06-08 14:32:57 -0700
committer1029chris <1029chris@gmail.com>2016-06-08 14:32:57 -0700
commit7b0bc171d659ff4a0dddc724860fdd09f42b08b3 (patch)
treeb0a0a6961d838ffade9773ed85f1b902f7c6ddce /viewer.lua
parent0c3a6ca6190ad47e5fbe1dfaa45c45aa07b4ced9 (diff)
Added video player
Added 1 video for video player to play
Diffstat (limited to 'viewer.lua')
-rw-r--r--viewer.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/viewer.lua b/viewer.lua
index 506c406..943bd5a 100644
--- a/viewer.lua
+++ b/viewer.lua
@@ -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