Rename keycode function

This commit is contained in:
oakes
2014-01-10 19:27:53 -05:00
parent 5160723250
commit 2f20efa27e

View File

@@ -34,14 +34,14 @@
:y (.getY ^Input (Gdx/input)) :y (.getY ^Input (Gdx/input))
nil)) nil))
(defmacro get-keycode (defmacro keycode
[key] [key]
`~(symbol `~(symbol
(str utils/gdx-package ".Input$Keys/" (utils/key->static-field key)))) (str utils/gdx-package ".Input$Keys/" (utils/key->static-field key))))
(defmacro is-pressed? (defmacro is-pressed?
[key] [key]
`(.isKeyPressed ^Input (Gdx/input) (get-keycode ~key))) `(.isKeyPressed ^Input (Gdx/input) (keycode ~key)))
(defn- input-processor (defn- input-processor
[{:keys [on-key-down on-key-typed on-key-up on-mouse-moved [{:keys [on-key-down on-key-typed on-key-up on-mouse-moved