mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 18:59:15 +07:00
Resolved #3568 - text buttons are less grainy
This commit is contained in:
@ -152,9 +152,11 @@ object ImageGetter {
|
||||
}
|
||||
|
||||
fun getRoundedEdgeTableBackground(tintColor: Color? = null): NinePatchDrawable {
|
||||
val drawable = NinePatchDrawable(NinePatch(getDrawable("OtherIcons/buttonBackground").region, 25, 25, 0, 0)).apply {
|
||||
setPadding(5f, 15f, 5f, 15f)
|
||||
}
|
||||
val region = getDrawable("OtherIcons/buttonBackground").region
|
||||
region.texture.setFilter(Texture.TextureFilter.MipMapLinearNearest, Texture.TextureFilter.Linear)
|
||||
val drawable = NinePatchDrawable(NinePatch(region, 25, 25, 0, 0))
|
||||
drawable.setPadding(5f, 15f, 5f, 15f)
|
||||
|
||||
if (tintColor == null) return drawable
|
||||
return drawable.tint(tintColor)
|
||||
}
|
||||
|
Reference in New Issue
Block a user