Add dynamic method generation and change the API
This commit is contained in:
@@ -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))
|
||||
Reference in New Issue
Block a user