Idle units are much more visible on the map

Technically, nstead of fading out the entire unit with its background, we just fade out its central icon, that way it remains much more visible on the map
This commit is contained in:
Yair Morgenstern 2019-09-15 18:15:57 +03:00
parent 3084a5bc33
commit b038e926a4
3 changed files with 8 additions and 5 deletions

View file

@ -451,7 +451,10 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
newImage.center(this)
newImage.y += yFromCenter
if (!unit.isIdle() && unit.civInfo.isPlayerCivilization()) newImage.color.a = 0.5f
// Instead of fading out the entire unit with its background, we just fade out its central icon,
// that way it remains much more visible on the map
if (!unit.isIdle() && unit.civInfo.isPlayerCivilization())
newImage.unitBaseImage.color.a = 0.5f
}
return newImage
}

View file

@ -9,11 +9,11 @@ import com.unciv.logic.map.MapUnit
class UnitGroup(val unit: MapUnit, val size: Float): Group() {
var blackSpinningCircle:Image?=null
init {
val unitBaseImage = ImageGetter.getUnitIcon(unit.name, unit.civInfo.nation.getInnerColor())
.apply { setSize(size * 0.75f, size * 0.75f) }
init {
val background = getBackgroundImageForUnit(unit)
background.apply {
this.color = unit.civInfo.nation.getOuterColor()

View file

@ -253,8 +253,8 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
val buttonPic = Table()
buttonPic.background = ImageGetter.getDrawable("OtherIcons/civTableBackground")
.tint(colorFromRGB(7, 46, 43))
buttonPic.defaults().pad(10f)
buttonPic.add("{Pick a tech}!".toLabel().setFontColor(Color.WHITE).setFontSize(22))
buttonPic.defaults().pad(20f)
buttonPic.add("{Pick a tech}!".toLabel().setFontColor(Color.WHITE).setFontSize(24))
techButtonHolder.add(buttonPic)
}
else {