Start 0.2.5-SNAPSHOT

This commit is contained in:
oakes
2014-04-02 14:26:04 -04:00
parent 29f17691b7
commit 6fe32e21c1
3 changed files with 17 additions and 1 deletions

View File

@@ -101,6 +101,8 @@
"Input" {"input!" :methods}
"Input.Keys" {"key-code" :static-fields
"key-pressed?" :static-fields}
"Input.Buttons" {"button-code" :static-fields
"button-pressed?" :static-fields}
"Interpolation" {"interpolation" :static-classes}
"Intersector" {"intersector!" :static-methods}
"IntAttribute" {"attribute :int" :constructors

View File

@@ -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"
:url "https://github.com/oakes/play-clj"
:license {:name "Public Domain"

View File

@@ -116,6 +116,20 @@
[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!
[^InputProcessor p]
(let [^InputMultiplexer multi (input! :get-input-processor)]