Add select-box
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
[com.badlogic.gdx.graphics.g2d BitmapFont TextureRegion]
|
[com.badlogic.gdx.graphics.g2d BitmapFont TextureRegion]
|
||||||
[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 Skin Slider
|
HorizontalGroup Image ImageButton ImageTextButton Label SelectBox
|
||||||
Table TextButton TextField VerticalGroup WidgetGroup]
|
Skin Slider Table TextButton TextField VerticalGroup WidgetGroup]
|
||||||
[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
|
||||||
@@ -223,6 +223,20 @@
|
|||||||
[entity k & options]
|
[entity k & options]
|
||||||
`(u/call! ^Label (:object ~entity) ~k ~@options))
|
`(u/call! ^Label (:object ~entity) ~k ~@options))
|
||||||
|
|
||||||
|
(defn select-box*
|
||||||
|
[items arg]
|
||||||
|
(u/create-entity (SelectBox. (into-array items) arg)))
|
||||||
|
|
||||||
|
(defmacro select-box
|
||||||
|
[items arg & options]
|
||||||
|
`(let [entity# (select-box* ~items ~arg)]
|
||||||
|
(u/calls! ^SelectBox (:object entity#) ~@options)
|
||||||
|
entity#))
|
||||||
|
|
||||||
|
(defmacro select-box!
|
||||||
|
[entity k & options]
|
||||||
|
`(u/call! ^SelectBox (:object ~entity) ~k ~@options))
|
||||||
|
|
||||||
(defn slider*
|
(defn slider*
|
||||||
[{:keys [min max step vertical?]
|
[{:keys [min max step vertical?]
|
||||||
:or {min 0 max 10 step 1 vertical? false}}
|
:or {min 0 max 10 step 1 vertical? false}}
|
||||||
|
|||||||
Reference in New Issue
Block a user