Add type hints
This commit is contained in:
@@ -16,7 +16,8 @@ memory.
|
|||||||
|
|
||||||
(pixmap! object :dispose)"
|
(pixmap! object :dispose)"
|
||||||
[object k & options]
|
[object k & options]
|
||||||
`(u/call! ^Pixmap ~object ~k ~@options))
|
`(let [^Pixmap object# ~object]
|
||||||
|
(u/call! 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).
|
"Returns a static field from [ShapeRenderer.ShapeType](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.ShapeType.html).
|
||||||
|
|||||||
@@ -24,10 +24,12 @@
|
|||||||
(-> ^String arg Texture. TextureRegion.)
|
(-> ^String arg Texture. TextureRegion.)
|
||||||
(isa? (type arg) Pixmap)
|
(isa? (type arg) Pixmap)
|
||||||
(-> ^Pixmap arg Texture. TextureRegion.)
|
(-> ^Pixmap arg Texture. TextureRegion.)
|
||||||
|
(isa? (type arg) TextureRegion)
|
||||||
|
arg
|
||||||
(:object arg)
|
(:object arg)
|
||||||
(TextureRegion. ^TextureRegion (:object arg))
|
(TextureRegion. ^TextureRegion (:object arg))
|
||||||
:else
|
:else
|
||||||
arg)))
|
(TextureRegion. arg))))
|
||||||
|
|
||||||
(defmacro texture
|
(defmacro texture
|
||||||
"Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html).
|
"Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html).
|
||||||
|
|||||||
Reference in New Issue
Block a user