added registerEventHandler() and clearEventHandler() Engine functions with ag:: lua interfaces

git-svn-id: svn://anubis/anaglym/trunk@115 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop committed 2009-10-20 02:19:43 +00:00
1 parent 47515f7b1c
commit e1281bde17
5 files changed
+93 -8

No files matched your search

+8
View File
@@ -32,5 +32,13 @@ function key_down_event(key)
crates[cratenum] = nil
cratenum = cratenum - 1
end
elseif (key == "m") then
ag.registerEventHandler(mouse_moves, "mouse_motion")
elseif (key == "n") then
ag.clearEventHandler("mouse_motion")
end
end
function mouse_moves(x, y, xrel, yrel)
ag.println("mouse_moves ", x, ", ", y)
end