mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-23 22:30:18 +07:00
Better minimap buttons
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user