Bring back shape-type
This commit is contained in:
@@ -177,6 +177,7 @@
|
|||||||
"SelectBox.SelectBoxStyle" {"style :select-box" :constructors}
|
"SelectBox.SelectBoxStyle" {"style :select-box" :constructors}
|
||||||
"ShapeRenderer" {"shape" :methods
|
"ShapeRenderer" {"shape" :methods
|
||||||
"shape!" :methods}
|
"shape!" :methods}
|
||||||
|
"ShapeRenderer.ShapeType" {"shape-type" :static-fields}
|
||||||
"Skin" {"skin" :methods
|
"Skin" {"skin" :methods
|
||||||
"skin!" :methods}
|
"skin!" :methods}
|
||||||
"SkinLoader" {"loader :skin" :methods
|
"SkinLoader" {"loader :skin" :methods
|
||||||
|
|||||||
@@ -14,7 +14,10 @@
|
|||||||
[object k & options]
|
[object k & options]
|
||||||
`(u/call! ^Pixmap ~object ~k ~@options))
|
`(u/call! ^Pixmap ~object ~k ~@options))
|
||||||
|
|
||||||
(defmacro shape-type*
|
(defmacro shape-type
|
||||||
|
"Returns a static field from [ShapeRenderer.ShapeType](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.ShapeType.html).
|
||||||
|
|
||||||
|
(shape-type :filled)"
|
||||||
[k]
|
[k]
|
||||||
`~(u/gdx-field :graphics :glutils "ShapeRenderer$ShapeType" (u/key->pascal k)))
|
`~(u/gdx-field :graphics :glutils "ShapeRenderer$ShapeType" (u/key->pascal k)))
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@
|
|||||||
Throwable.
|
Throwable.
|
||||||
throw))
|
throw))
|
||||||
`(let [entity# ~(if (keyword? type)
|
`(let [entity# ~(if (keyword? type)
|
||||||
`(assoc (shape*) :type (shape-type* ~type))
|
`(assoc (shape*) :type (shape-type ~type))
|
||||||
type)
|
type)
|
||||||
^ShapeRenderer object# (u/get-obj entity# :object)]
|
^ShapeRenderer object# (u/get-obj entity# :object)]
|
||||||
(assoc entity# :draw! (fn [] (u/calls! object# ~@options)))))
|
(assoc entity# :draw! (fn [] (u/calls! object# ~@options)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user