Start UI code and allow multiple screens to be displayed
This commit is contained in:
15
src/play_clj/core_ui.clj
Normal file
15
src/play_clj/core_ui.clj
Normal file
@@ -0,0 +1,15 @@
|
||||
(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]
|
||||
(create-actor (Label. text (Label$LabelStyle. (BitmapFont.) color))))
|
||||
Reference in New Issue
Block a user