diff --git a/core/src/com/unciv/ui/worldscreen/minimap/MapOverlayToggleButton.kt b/core/src/com/unciv/ui/worldscreen/minimap/MapOverlayToggleButton.kt index 950233deac..01fdc529e3 100644 --- a/core/src/com/unciv/ui/worldscreen/minimap/MapOverlayToggleButton.kt +++ b/core/src/com/unciv/ui/worldscreen/minimap/MapOverlayToggleButton.kt @@ -25,13 +25,14 @@ class MapOverlayToggleButton( /** [Actor] of the button. Add this to whatever layout. */ val actor: IconCircleGroup by lazy { var innerActor: Actor = icon + val iconSize = 30f if (backgroundColor != null) { innerActor = innerActor - .surroundWithCircle(30f) + .surroundWithCircle(iconSize) .apply { circle.color = backgroundColor } - } + } else innerActor.setSize(iconSize,iconSize) // So, the "Food" and "Population" stat icons have green as part of their image, but the "Cattle" icon needs a background colour, which is… An interesting mixture/reuse of texture data and render-time processing. - innerActor.surroundWithCircle(40f).apply { circle.color = Color.BLACK } + innerActor.surroundWithCircle(32f, resizeActor = false).apply { circle.color = Color.BLACK } } init {