2
-- A cursor is a group that follows the user's cursor.
6
-- A table with x and y offsets for the cursor. e.g. if
7
-- you want the user to click with a center of a crosshairs
8
-- image, set this to half the width and half the height of
10
hotspot = { x = 0, y = 0 },
12
new = function (self, obj)
13
obj = self:extend(obj)
15
if obj.onNew then obj:onNew() end
19
update = function (self, elapsed)
22
self.translate.x = the.mouse.x - self.hotspot.x
23
self.translate.y = the.mouse.y - self.hotspot.y
25
Group.update(self, elapsed)