Simplify slider function
This commit is contained in:
@@ -85,13 +85,14 @@
|
|||||||
`(u/create-entity (u/calls! ^Label (label* ~text ~arg) ~@options)))
|
`(u/create-entity (u/calls! ^Label (label* ~text ~arg) ~@options)))
|
||||||
|
|
||||||
(defn slider*
|
(defn slider*
|
||||||
[min max step is-vert? arg]
|
[{:keys [min max step vertical?]
|
||||||
(Slider. (float min) (float max) (float step) is-vert? arg))
|
:or {min 0 max 10 step 1 vertical? false}}
|
||||||
|
arg]
|
||||||
|
(Slider. (float min) (float max) (float step) vertical? arg))
|
||||||
|
|
||||||
(defmacro slider
|
(defmacro slider
|
||||||
[min max step is-vert? arg & options]
|
[attrs arg & options]
|
||||||
`(u/create-entity (u/calls! ^Slider (slider* ~min ~max ~step ~is-vert? ~arg)
|
`(u/create-entity (u/calls! ^Slider (slider* ~attrs ~arg) ~@options)))
|
||||||
~@options)))
|
|
||||||
|
|
||||||
(defn text-button*
|
(defn text-button*
|
||||||
[^String text arg]
|
[^String text arg]
|
||||||
|
|||||||
Reference in New Issue
Block a user