1
Balloon = Group:extend{
3
text = Text:new{wordWrap = true, width = 50, tint = {0,0,0}},
4
box = Fill:new{width = 54, border = {0,0,255}},
9
the.view:moveToBack(self)
12
onUpdate = function(self)
14
local spr = self.sprite
15
self.text:centerAround(spr.x + (spr.width/2),
16
spr.y + (spr.height/2), --ignored
18
_, texth = self.text:getSize()
19
self.text.y = spr.y - texth - 4
20
self.box.x = self.text.x - 2
21
self.box.y = self.text.y - 2
24
setText = function(self, text)
26
_, texth = self.text:getSize()
27
self.box.height = texth + 4
b'\\ No newline at end of file'