Don't set default x and y values, and change some key names
This commit is contained in:
@@ -159,7 +159,8 @@
|
||||
(.draw object batch 1))
|
||||
|
||||
(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)
|
||||
(.draw batch object (float x) (float y) (float width) (float height)))
|
||||
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
(execute-fn! on-key-up :keycode k)
|
||||
false)
|
||||
(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)
|
||||
(scrolled [this a]
|
||||
(execute-fn! on-scrolled :amount a)
|
||||
false)
|
||||
(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)
|
||||
(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)
|
||||
(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)))
|
||||
|
||||
(defn ^:private gesture-listener
|
||||
|
||||
@@ -140,8 +140,6 @@
|
||||
[^TextureRegion obj]
|
||||
{:type :texture
|
||||
:object obj
|
||||
:x 0
|
||||
:y 0
|
||||
:width (.getRegionWidth obj)
|
||||
:height (.getRegionHeight obj)})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user