mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Resolved #3428 - added a toggle for displaying yield icons
This commit is contained in:
parent
78513b87c1
commit
eda8b84c2d
@ -108,15 +108,7 @@ class MinimapHolder(mapHolder: WorldMapHolder): Table(){
|
|||||||
|
|
||||||
private fun getWrappedMinimap(): Table {
|
private fun getWrappedMinimap(): Table {
|
||||||
val internalMinimapWrapper = Table()
|
val internalMinimapWrapper = Table()
|
||||||
// // Temporarily disabled until we can make them work nicely together
|
internalMinimapWrapper.add(minimap)
|
||||||
// val sizePercent = worldScreen.game.settings.minimapSize
|
|
||||||
// val sizeWinX = worldScreen.stage.width * sizePercent / 100
|
|
||||||
// val sizeWinY = worldScreen.stage.height * sizePercent / 100
|
|
||||||
// val isSquare = worldScreen.game.settings.minimapSquare
|
|
||||||
// val sizeX = if (isSquare) sqrt(sizeWinX * sizeWinY) else sizeWinX
|
|
||||||
// val sizeY = if (isSquare) sizeX else sizeWinY
|
|
||||||
internalMinimapWrapper.add(minimap) //.size(sizeX,sizeY)
|
|
||||||
minimap
|
|
||||||
|
|
||||||
internalMinimapWrapper.background = ImageGetter.getBackground(Color.GRAY)
|
internalMinimapWrapper.background = ImageGetter.getBackground(Color.GRAY)
|
||||||
internalMinimapWrapper.pack()
|
internalMinimapWrapper.pack()
|
||||||
@ -133,6 +125,16 @@ class MinimapHolder(mapHolder: WorldMapHolder): Table(){
|
|||||||
val toggleIconTable = Table()
|
val toggleIconTable = Table()
|
||||||
val settings = UncivGame.Current.settings
|
val settings = UncivGame.Current.settings
|
||||||
|
|
||||||
|
val yieldImage = ImageGetter.getStatIcon("Food").surroundWithCircle(40f)
|
||||||
|
yieldImage.circle.color = Color.BLACK
|
||||||
|
yieldImage.actor.color.a = if (settings.showTileYields) 1f else 0.5f
|
||||||
|
yieldImage.onClick {
|
||||||
|
settings.showTileYields = !settings.showTileYields
|
||||||
|
yieldImage.actor.color.a = if (settings.showTileYields) 1f else 0.5f
|
||||||
|
worldScreen.shouldUpdate = true
|
||||||
|
}
|
||||||
|
toggleIconTable.add(yieldImage).row()
|
||||||
|
|
||||||
val populationImage = ImageGetter.getStatIcon("Population").surroundWithCircle(40f)
|
val populationImage = ImageGetter.getStatIcon("Population").surroundWithCircle(40f)
|
||||||
populationImage.circle.color = Color.BLACK
|
populationImage.circle.color = Color.BLACK
|
||||||
populationImage.actor.color.a = if (settings.showWorkedTiles) 1f else 0.5f
|
populationImage.actor.color.a = if (settings.showWorkedTiles) 1f else 0.5f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user