mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
perf(render): Improved yield render performance for modded images
This commit is contained in:
BIN
android/Images.Icons/StatIcons/Circle.png
Normal file
BIN
android/Images.Icons/StatIcons/Circle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -641,6 +641,13 @@ ResourceIcons/Circle
|
||||
orig: 178, 178
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
StatIcons/Circle
|
||||
rotate: false
|
||||
xy: 289, 1590
|
||||
size: 178, 178
|
||||
orig: 178, 178
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
OtherIcons/Cities
|
||||
rotate: false
|
||||
xy: 208, 1436
|
||||
|
@ -32,7 +32,7 @@ class YieldGroup : HorizontalGroup() {
|
||||
}
|
||||
|
||||
fun getIcon(statName: String) =
|
||||
ImageGetter.getStatIcon(statName).surroundWithCircle(12f)
|
||||
ImageGetter.getStatIcon(statName).surroundWithCircle(12f, circleImageLocation = "StatIcons/Circle")
|
||||
.apply { circle.color = ImageGetter.CHARCOAL; circle.color.a = 0.5f }
|
||||
|
||||
private fun getStatIconsTable(statName: String, number: Int): Table {
|
||||
|
@ -31,13 +31,14 @@ If you use external tools and multiple atlases, you will need to maintain this f
|
||||
|
||||
### Rendering Performance
|
||||
|
||||
Images that are packed together are much faster to render together.
|
||||
Images that are packed together are much faster to render together. If most of the images in your mod are using images from the mod, we want to be able to wrap them from images *also* from your mod.
|
||||
To allow for faster rendering for icons, which has a major performance effect, you can copy the ["OtherIcons/circle.png"](https://github.com/yairm210/Unciv/blob/master/android/Images.Icons/OtherIcons/Circle.png) to:
|
||||
|
||||
- "ImprovementIcons/Circle.png" for improvements
|
||||
- "ResourceIcons/Circle.png" for resources
|
||||
- "TechIcons/Circle.png" for technologies
|
||||
- "ConstructionIcons/Circle.png" for buildings and units
|
||||
- "StatIcons/Circle.png" for stats
|
||||
|
||||
### Texture packer settings
|
||||
|
||||
|
Reference in New Issue
Block a user