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