aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 4df98c2..542b23c 100644
--- a/main.lua
+++ b/main.lua
@@ -106,6 +106,49 @@ function love.keyreleased(key)
pause.esc = false
end
end
+function love.keypressed(key)
+ if key == "backspace" and layer[1] == 2 and v1.yes == false then
+ internet.url = string.sub(internet.url, 1, string.len(internet.url)-1)
+ if internet.url ~= internet.urlold then
+ win[2].update = true
+ internet.blink = true
+ internet.blinkTimer = 0
+ end
+ end
+ if key == "return" or key == "kpenter" then
+ if layer[1] == 2 then
+ internet.urlc = internet.url
+ win[2].update = true
+ internet.load = 0
+ elseif layer[1] == 1 and chat.msg ~= "" then
+ sendMessage(2, chat.msg)
+ if chat.status == 1 then
+ chatReply(string.lower(chat.msg))
+ end
+ chat.msg = ""
+ end
+ end
+ if key == "backspace" and layer[1] == 1 and v1.yes == false then
+ chat.msg = string.sub(chat.msg, 1, string.len(chat.msg)-1)
+ if chat.msg ~= chat.msgold then
+ win[1].update = true
+ chat.blink = true
+ chat.blinkTimer = 0.5
+ end
+ end
+ if key == "z" then
+ 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
+ if v2.msgs[v2.c.chat.msgs] ~= nil then
+ if string.len(v2.msgs[v2.c.chat.msgs]) == string.len(v2.c.chat.msg) and v2.start == true then
+ v2.c.chat.next = false
+ end
+ end
+ end
+end
function love.mousereleased(x, y, button)
if scene ~= 0 then
sys.mouse.p.p = false