aboutsummaryrefslogtreecommitdiff
path: root/internet.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-07-24 18:12:28 -0700
committer1029chris <1029chris@gmail.com>2016-07-24 18:12:28 -0700
commit38dd1fd41baed2ed0c633da0246ffefc04ec96a3 (patch)
treef7fec89b8b07a927d3dcd608aefc1af488f792f8 /internet.lua
parent260c99a47be458cffcefd2cf9170447b2a45739f (diff)
You can chat with best friend now
Diffstat (limited to 'internet.lua')
-rw-r--r--internet.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/internet.lua b/internet.lua
index 98ce15c..375b4cf 100644
--- a/internet.lua
+++ b/internet.lua
@@ -58,6 +58,21 @@ function updateInternet()
win[2].update = true
internet.load = 0
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 == "return" and 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
function love.textinput(t)
if layer[1] == 2 and v1.yes == false then
@@ -68,6 +83,16 @@ function updateInternet()
internet.blinkTimer = 0
end
end
+ if layer[1] == 1 and v1.yes == false then
+ if string.len(chat.msg) < 18 then
+ chat.msg = chat.msg .. t
+ end
+ if chat.msg ~= chat.msgold then
+ win[1].update = true
+ chat.blink = true
+ chat.blinkTimer = 0.5
+ end
+ end
end
if internet.load ~= 442 then
if math.random(1,3) == 3 then