mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-20 19:56:51 +01:00
perf(render): Minimized texture swaps for improvements/resources
This commit is contained in:
parent
c2e83c9ee9
commit
bdf2d43176
BIN
android/Images.Icons/ImprovementIcons/Circle.png
Normal file
BIN
android/Images.Icons/ImprovementIcons/Circle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
android/Images.Icons/ResourceIcons/Circle.png
Normal file
BIN
android/Images.Icons/ResourceIcons/Circle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -627,6 +627,20 @@ OtherIcons/Circle
|
|||
orig: 178, 178
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ImprovementIcons/Circle
|
||||
rotate: false
|
||||
xy: 289, 1590
|
||||
size: 178, 178
|
||||
orig: 178, 178
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ResourceIcons/Circle
|
||||
rotate: false
|
||||
xy: 289, 1590
|
||||
size: 178, 178
|
||||
orig: 178, 178
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
OtherIcons/Cities
|
||||
rotate: false
|
||||
xy: 208, 1436
|
||||
|
|
|
|||
|
|
@ -163,6 +163,8 @@ class PortraitResource(name: String, size: Float, amount: Int = 0) : Portrait(Ty
|
|||
}
|
||||
}
|
||||
|
||||
override fun getCircleImage() = ImageGetter.getImage("ResourceIcons/Circle")
|
||||
|
||||
override fun getDefaultInnerBackgroundTint(): Color =
|
||||
ruleset.tileResources[imageName]?.resourceType?.getColor() ?: Color.WHITE
|
||||
|
||||
|
|
@ -220,6 +222,8 @@ class PortraitImprovement(name: String, size: Float, dim: Boolean = false, isPil
|
|||
addActor(pillagedIcon)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getCircleImage() = ImageGetter.getImage("ImprovementIcons/Circle")
|
||||
|
||||
private fun getColorFromStats(stats: Stats): Color {
|
||||
if (stats.asSequence().none { it.value > 0 })
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user