diff options
| author | 1029chris <1029chris@gmail.com> | 2016-11-12 01:35:58 -0800 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-11-12 01:35:58 -0800 |
| commit | 06153021393c736a3e1a15f388d5d8dca6844748 (patch) | |
| tree | 04e477c5a545f5abacc5d23e42c89fb798efcd3e /main.lua | |
| parent | b804ec761520ca4663db55b81caef0e773f81805 (diff) | |
Fixed some bugs, Z can now be used to see next message
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -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 |
