Pass actors in screen map using a consistent keyword

This commit is contained in:
oakes
2014-05-08 03:14:39 -04:00
parent 355abaecab
commit 0c23bf45f0
2 changed files with 4 additions and 4 deletions

View File

@@ -270,7 +270,7 @@ via the screen map.
:on-ui-enter ; the finger/mouse moved over the ui entity
(fn [screen entities]
(println (:event screen)) ; the InputEvent - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/InputEvent.html
(println (:from-actor screen)) ; the Actor - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html
(println (:actor screen)) ; the Actor - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html
(println (:input-x screen)) ; the x position of the finger/mouse
(println (:input-y screen)) ; the y position of the finger/mouse
(println (:pointer screen)) ; the pointer for the event
@@ -278,7 +278,7 @@ via the screen map.
:on-ui-exit ; the finger/mouse moved out of the ui entity
(fn [screen entities]
(println (:event screen)) ; the InputEvent - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/InputEvent.html
(println (:to-actor screen)) ; the Actor - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html
(println (:actor screen)) ; the Actor - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html
(println (:input-x screen)) ; the x position of the finger/mouse
(println (:input-y screen)) ; the y position of the finger/mouse
(println (:pointer screen)) ; the pointer for the event

View File

@@ -118,10 +118,10 @@
(execute-fn! on-ui-clicked :event e :input-x x :input-y y))
(enter [e x y p a]
(execute-fn! on-ui-enter
:event e :input-x x :input-y y :pointer p :from-actor a))
:event e :input-x x :input-y y :pointer p :actor a))
(exit [e x y p a]
(execute-fn! on-ui-exit
:event e :input-x x :input-y y :pointer p :to-actor a))
:event e :input-x x :input-y y :pointer p :actor a))
(touchDown [e x y p b]
(execute-fn! on-ui-touch-down
:event e :input-x x :input-y y :pointer p :button b)