Start UI code and allow multiple screens to be displayed

This commit is contained in:
oakes
2014-01-05 20:52:53 -05:00
parent 0567451679
commit 8e0fdc8ed4
3 changed files with 76 additions and 29 deletions

15
src/play_clj/core_ui.clj Normal file
View 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))))