Add dynamic method generation and change the API

This commit is contained in:
oakes
2014-01-06 03:46:43 -05:00
parent a848ebac32
commit a387957289
5 changed files with 47 additions and 59 deletions

View File

@@ -1,17 +0,0 @@
(in-ns 'play-clj.core)
(defmacro color
[& args]
`~(if (keyword? (first args))
`(Color. ^Color (utils/gdx-static-field :graphics :Color ~(first args)))
`(Color. ~@args)))
(defn create-actor
[actor]
{:actor actor :x 0 :y 0})
(defn label
[text color]
(->> (Label$LabelStyle. (BitmapFont.) color)
(Label. text)
create-actor))