Add bundle

This commit is contained in:
oakes
2014-04-09 18:19:55 -04:00
parent 1c28968d20
commit a8a980a569
3 changed files with 16 additions and 1 deletions

View File

@@ -7,6 +7,16 @@
[& body]
`(app! :post-runnable (fn [] ~@body)))
(defn bundle
"Returns an entity containing other entities. This is a useful way to keep
related entities together. They will be drawn in the order they appear in the
internal :entities vector.
(bundle (shape :filled) (texture \"image.png\"))
(assoc (bundle) :entities [])"
[& entities]
(BundleEntity. entities))
(defn screenshot!
"Captures a screenshot and either returns it as a `pixmap` or saves it to the
specified path.