Start 0.2.5-SNAPSHOT
This commit is contained in:
@@ -101,6 +101,8 @@
|
|||||||
"Input" {"input!" :methods}
|
"Input" {"input!" :methods}
|
||||||
"Input.Keys" {"key-code" :static-fields
|
"Input.Keys" {"key-code" :static-fields
|
||||||
"key-pressed?" :static-fields}
|
"key-pressed?" :static-fields}
|
||||||
|
"Input.Buttons" {"button-code" :static-fields
|
||||||
|
"button-pressed?" :static-fields}
|
||||||
"Interpolation" {"interpolation" :static-classes}
|
"Interpolation" {"interpolation" :static-classes}
|
||||||
"Intersector" {"intersector!" :static-methods}
|
"Intersector" {"intersector!" :static-methods}
|
||||||
"IntAttribute" {"attribute :int" :constructors
|
"IntAttribute" {"attribute :int" :constructors
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
(defproject play-clj "0.2.4"
|
(defproject play-clj "0.2.5-SNAPSHOT"
|
||||||
:description "A LibGDX wrapper for easy cross-platform game development"
|
:description "A LibGDX wrapper for easy cross-platform game development"
|
||||||
:url "https://github.com/oakes/play-clj"
|
:url "https://github.com/oakes/play-clj"
|
||||||
:license {:name "Public Domain"
|
:license {:name "Public Domain"
|
||||||
|
|||||||
@@ -116,6 +116,20 @@
|
|||||||
[k]
|
[k]
|
||||||
`(key-pressed? ~k))
|
`(key-pressed? ~k))
|
||||||
|
|
||||||
|
(defmacro button-code
|
||||||
|
"Returns a static field from [Input.Buttons](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Buttons.html).
|
||||||
|
|
||||||
|
(button-code :left)"
|
||||||
|
[k]
|
||||||
|
`~(u/gdx-field "Input$Buttons" (u/key->upper k)))
|
||||||
|
|
||||||
|
(defmacro button-pressed?
|
||||||
|
"Returns a boolean indicating if the button cooresponding to `k` is being pressed.
|
||||||
|
|
||||||
|
(button-pressed? :left)"
|
||||||
|
[k]
|
||||||
|
`(input! :is-button-pressed (button-code ~k)))
|
||||||
|
|
||||||
(defn ^:private add-input!
|
(defn ^:private add-input!
|
||||||
[^InputProcessor p]
|
[^InputProcessor p]
|
||||||
(let [^InputMultiplexer multi (input! :get-input-processor)]
|
(let [^InputMultiplexer multi (input! :get-input-processor)]
|
||||||
|
|||||||
Reference in New Issue
Block a user