Don't set default x and y values, and change some key names

This commit is contained in:
oakes
2014-01-19 17:00:07 -05:00
parent ebdb097462
commit f582f18392
3 changed files with 6 additions and 7 deletions

View File

@@ -159,7 +159,8 @@
(.draw object batch 1)) (.draw object batch 1))
(defmethod draw-entity! :texture (defmethod draw-entity! :texture
[^SpriteBatch batch {:keys [^TextureRegion object x y width height]}] [^SpriteBatch batch {:keys [^TextureRegion object x y width height]
:or {x 0 y 0}}]
(assert object) (assert object)
(.draw batch object (float x) (float y) (float width) (float height))) (.draw batch object (float x) (float y) (float width) (float height)))

View File

@@ -17,19 +17,19 @@
(execute-fn! on-key-up :keycode k) (execute-fn! on-key-up :keycode k)
false) false)
(mouseMoved [this sx sy] (mouseMoved [this sx sy]
(execute-fn! on-mouse-moved :screen-x sx :screen-y sy) (execute-fn! on-mouse-moved :x sx :y sy)
false) false)
(scrolled [this a] (scrolled [this a]
(execute-fn! on-scrolled :amount a) (execute-fn! on-scrolled :amount a)
false) false)
(touchDown [this sx sy p b] (touchDown [this sx sy p b]
(execute-fn! on-touch-down :screen-x sx :screen-y sy :pointer p :button b) (execute-fn! on-touch-down :x sx :y sy :pointer p :button b)
false) false)
(touchDragged [this sx sy p] (touchDragged [this sx sy p]
(execute-fn! on-touch-dragged :screen-x sx :screen-y sy :pointer p) (execute-fn! on-touch-dragged :x sx :y sy :pointer p)
false) false)
(touchUp [this sx sy p b] (touchUp [this sx sy p b]
(execute-fn! on-touch-up :screen-x sx :screen-y sy :pointer p :button b) (execute-fn! on-touch-up :x sx :y sy :pointer p :button b)
false))) false)))
(defn ^:private gesture-listener (defn ^:private gesture-listener

View File

@@ -140,8 +140,6 @@
[^TextureRegion obj] [^TextureRegion obj]
{:type :texture {:type :texture
:object obj :object obj
:x 0
:y 0
:width (.getRegionWidth obj) :width (.getRegionWidth obj)
:height (.getRegionHeight obj)}) :height (.getRegionHeight obj)})