mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
ImageGetter.getDrawable a few ns faster (#6936)
This commit is contained in:
parent
6f7af9ee22
commit
e927ef6f64
@ -170,8 +170,7 @@ object ImageGetter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getDrawable(fileName: String?): TextureRegionDrawable {
|
fun getDrawable(fileName: String?): TextureRegionDrawable {
|
||||||
return if (fileName != null && textureRegionDrawables.containsKey(fileName)) textureRegionDrawables[fileName]!!
|
return textureRegionDrawables[fileName] ?: textureRegionDrawables[whiteDotLocation]!!
|
||||||
else textureRegionDrawables[whiteDotLocation]!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRoundedEdgeRectangle(tintColor: Color? = null): NinePatchDrawable {
|
fun getRoundedEdgeRectangle(tintColor: Color? = null): NinePatchDrawable {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user