aboutsummaryrefslogtreecommitdiff
path: root/elements.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-04-24 13:58:13 -0700
committer1029chris <1029chris@gmail.com>2016-04-24 13:58:13 -0700
commit8725935026565e3a0398041be41307f9587d2f9d (patch)
treeee1a8cebab660871b40d77d849eb3ece466e16b9 /elements.lua
parent9e83aca958c2f0d7cc9123c66dd8d5f9d22d8633 (diff)
Moved chat bubble code to elements.lua
Diffstat (limited to 'elements.lua')
-rw-r--r--elements.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/elements.lua b/elements.lua
index 976e1c1..1471e3e 100644
--- a/elements.lua
+++ b/elements.lua
@@ -48,3 +48,21 @@ function drawBlueBox(x, y, w, h, t)
love.graphics.setColor(0, 0, 80)
love.graphics.line(x, y+h, x+w, y+h, x+w, y)
end
+function drawBubble(x,y,w,h,m)
+ love.graphics.setColor(255,255,255)
+ love.graphics.rectangle("fill", x+20, y, w-40, h)
+ love.graphics.rectangle("fill", x, y+20, w, h-40)
+ love.graphics.draw(v1.corner, x, y, 0, 2)
+ love.graphics.draw(v1.corner, x+w, y, 0, -2, 2)
+ love.graphics.draw(v1.corner, x+w, y+h, 0, -2, -2)
+ love.graphics.draw(v1.cornerSpike, x, y+h-20, 0, 2)
+ love.graphics.setColor(0,0,0)
+ love.graphics.setLineWidth(1.5)
+ love.graphics.line(x+20, y+1, x+w-20, y+1)
+ love.graphics.line(x+30, y+h-1, x+w-20, y+h-1)
+ love.graphics.line(x+1, y+20, x+1, y+h-20)
+ love.graphics.line(x+w-1, y+20, x+w-1, y+h-20)
+ love.graphics.setFont(pixeloperator)
+ love.graphics.printf(m,x+15,y+15,w-30)
+ love.graphics.setFont(pressstart)
+end