Improve body functions and allow graphics macros to work on both the screen and the objects themselves

This commit is contained in:
oakes
2014-01-17 18:11:37 -05:00
parent 6b1eda86c8
commit b703780089
5 changed files with 69 additions and 43 deletions

View File

@@ -4,17 +4,23 @@
[com.badlogic.gdx.scenes.scene2d Actor]
[com.badlogic.gdx.utils Array ArrayMap]))
; exceptions
(defn throw-key-not-found
[k]
(throw (Exception. (str "The keyword " k " is not supported."))))
; converting keys
(def ^:const main-package "com.badlogic.gdx")
(defn ^:private split-key
[key]
(-> key name (s/split #"-")))
[k]
(-> k name (s/split #"-")))
(defn ^:private join-keys
[keys]
(->> keys (map name) (s/join ".") (str main-package ".")))
[k-list]
(->> k-list (map name) (s/join ".") (str main-package ".")))
(defn key->upper
[k]