From 5f57817773fe44b6417fa4e577fe45ebd2c7c351 Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Tue, 14 Jun 2016 14:28:45 -0700 Subject: Fixed loading crash when clicking --- main.lua | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/main.lua b/main.lua index d12e583..0fe3aaf 100644 --- a/main.lua +++ b/main.lua @@ -63,17 +63,19 @@ function love.update(dt) end end function love.mousepressed(x, y, button) - sys.mouse.p.x = x - sys.mouse.p.y = y - if button == 2 then - sys.mouse.p.p = false - end - if button == 1 then - sys.mouse.p.p = true - end - if v1.msgs[v1.c.chat.msgs] ~= nil then - if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then - v1.c.chat.next = false + if scene ~= 0 then + sys.mouse.p.x = x + sys.mouse.p.y = y + if button == 2 then + sys.mouse.p.p = false + end + if button == 1 then + sys.mouse.p.p = true + end + if v1.msgs[v1.c.chat.msgs] ~= nil then + if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then + v1.c.chat.next = false + end end end end @@ -87,16 +89,18 @@ function love.keyreleased(key) end end function love.mousereleased(x, y, button) - sys.mouse.p.p = false - start.p = false - for i=1,6 do - icon[i].cl = false + if scene ~= 0 then + sys.mouse.p.p = false + start.p = false + for i=1,6 do + icon[i].cl = false + end + file.p = false + mplay.drag = false + vplay.drag = false + mplay.pr = false + vplay.pr = false end - file.p = false - mplay.drag = false - vplay.drag = false - mplay.pr = false - vplay.pr = false end function love.draw() if scene == 1 then -- cgit