diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj index 888ee81..291c497 100644 --- a/src/play_clj/core_graphics.clj +++ b/src/play_clj/core_graphics.clj @@ -191,8 +191,9 @@ non-tile layers, like object and image layers. "Returns a list with strings cooresponding to the name of each layer in the tiled map in `screen`." [screen] - (for [^MapLayer layer (map-layers screen)] - (.getName layer))) + (doall + (for [^MapLayer layer (map-layers screen)] + (.getName layer)))) (defn map-objects* ([] diff --git a/src/play_clj/ui.clj b/src/play_clj/ui.clj index c5a5cf7..463069a 100644 --- a/src/play_clj/ui.clj +++ b/src/play_clj/ui.clj @@ -377,17 +377,18 @@ based on the file at `path`. ; select-box (defn select-box* - [items arg] - (ActorEntity. (SelectBox. (into-array items) arg))) + [arg] + (ActorEntity. (SelectBox. arg))) (defmacro select-box "Returns an entity based on [SelectBox](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/SelectBox.html). - (select-box [\"Item 1\" \"Item 2\" \"Item 3\"] - (style :select-box font color back scroll-style list-style)) - (select-box [\"Item 1\" \"Item 2\" \"Item 3\"] (skin \"uiskin.json\"))" - [items arg & options] - `(let [entity# (select-box* ~items ~arg)] + (select-box (style :select-box font color back scroll-style list-style) + :set-items [\"Item 1\" \"Item 2\" \"Item 3\"]) + (select-box (skin \"uiskin.json\") + :set-items [\"Item 1\" \"Item 2\" \"Item 3\"])" + [arg & options] + `(let [entity# (select-box* ~arg)] (u/calls! ^SelectBox (u/get-obj entity# :object) ~@options) entity#))