Add stack

This commit is contained in:
oakes
2014-01-12 19:31:35 -05:00
parent c89836f66c
commit 3feee36e8f

View File

@@ -6,8 +6,8 @@
[com.badlogic.gdx.scenes.scene2d Actor Stage]
[com.badlogic.gdx.scenes.scene2d.ui ButtonGroup CheckBox Dialog
HorizontalGroup Image ImageButton ImageTextButton Label ScrollPane
SelectBox Skin Slider Table TextButton TextField Tree Tree$Node
VerticalGroup WidgetGroup Window]
SelectBox Skin Slider Stack Table TextButton TextField Tree
Tree$Node VerticalGroup WidgetGroup Window]
[com.badlogic.gdx.scenes.scene2d.utils ActorGestureListener Align
ChangeListener ClickListener DragListener FocusListener
NinePatchDrawable SpriteDrawable TextureRegionDrawable
@@ -300,6 +300,20 @@
[entity k & options]
`(u/call! ^Slider (:object ~entity) ~k ~@options))
(defn stack*
[children]
(create-group (Stack.) children))
(defmacro stack
[children & options]
`(let [entity# (stack* ~children)]
(u/calls! ^Stack (:object entity#) ~@options)
entity#))
(defmacro stack!
[entity k & options]
`(u/call! ^Stack (:object ~entity) ~k ~@options))
(defn table*
[children]
(create-group (Table.) children))