Use asset manager in image constructor
This commit is contained in:
@@ -292,7 +292,8 @@ based on the file at `path`.
|
|||||||
(map? arg)
|
(map? arg)
|
||||||
(Image. ^TextureRegion (:object arg))
|
(Image. ^TextureRegion (:object arg))
|
||||||
(string? arg)
|
(string? arg)
|
||||||
(Image. (Texture. ^String arg))
|
(Image. (or (u/load-asset arg Texture)
|
||||||
|
(Texture. ^String arg)))
|
||||||
:else
|
:else
|
||||||
(Image. arg))))
|
(Image. arg))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user