Moved star,circle,shield icons to OtherIcons folder

This commit is contained in:
Yair Morgenstern 2018-05-24 22:31:06 +03:00
parent ea77ceca0f
commit 7ee62b7d1c
8 changed files with 13 additions and 13 deletions

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.game" applicationId "com.unciv.game"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 26 targetSdkVersion 26
versionCode 62 versionCode 63
versionName "2.2.3" versionName "2.2.4"
} }
buildTypes { buildTypes {
release { release {

View File

@ -30,7 +30,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
private val roadImages = HashMap<String, Image>() private val roadImages = HashMap<String, Image>()
private val borderImages = ArrayList<Image>() private val borderImages = ArrayList<Image>()
protected var unitImage: Group? = null protected var unitImage: Group? = null
private val circleImage = ImageGetter.getImage("UnitIcons/Circle.png") // for blue and red circles on the tile private val circleImage = ImageGetter.getImage("OtherIcons/Circle.png") // for blue and red circles on the tile
private val fogImage = ImageGetter.getImage("TerrainIcons/Fog.png") private val fogImage = ImageGetter.getImage("TerrainIcons/Fog.png")
init { init {
@ -116,7 +116,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
// This is some crazy voodoo magic so I'll explain. // This is some crazy voodoo magic so I'll explain.
for(i in -2..2) { for(i in -2..2) {
val image = ImageGetter.getImage("UnitIcons/Circle.png") val image = ImageGetter.getImage("OtherIcons/Circle.png")
image.setSize(5f, 5f) image.setSize(5f, 5f)
image.center(this) image.center(this)
// in addTiles, we set the position of groups by relative world position *0.8*groupSize, filter groupSize = 50 // in addTiles, we set the position of groups by relative world position *0.8*groupSize, filter groupSize = 50
@ -255,8 +255,8 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
val unitBaseImage = ImageGetter.getImage("UnitIcons/${unit.name}.png") val unitBaseImage = ImageGetter.getImage("UnitIcons/${unit.name}.png")
.apply { setSize(15f,15f) } .apply { setSize(15f,15f) }
val background = if(unit.isFortified()) ImageGetter.getImage("UnitIcons/Shield.png") val background = if(unit.isFortified()) ImageGetter.getImage("OtherIcons/Shield.png")
else ImageGetter.getImage("UnitIcons/Circle.png") else ImageGetter.getImage("OtherIcons/Circle.png")
background.apply { background.apply {
this.color = color this.color = color
setSize(20f,20f) setSize(20f,20f)

View File

@ -19,8 +19,8 @@ class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) {
var cityButton: Table? = null var cityButton: Table? = null
fun addWhiteHaloAroundUnit(){ fun addWhiteHaloAroundUnit(){
val whiteHalo = if(tileInfo.unit!!.isFortified()) ImageGetter.getImage("UnitIcons/Shield.png") val whiteHalo = if(tileInfo.unit!!.isFortified()) ImageGetter.getImage("OtherIcons/Shield.png")
else ImageGetter.getImage("UnitIcons/Circle.png") else ImageGetter.getImage("OtherIcons/Circle.png")
whiteHalo.setSize(25f,25f) whiteHalo.setSize(25f,25f)
whiteHalo.center(unitImage!!) whiteHalo.center(unitImage!!)
unitImage!!.addActor(whiteHalo) unitImage!!.addActor(whiteHalo)
@ -71,7 +71,7 @@ class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) {
cityButton!!.run { cityButton!!.run {
clear() clear()
if(city.isCapital()){ if(city.isCapital()){
val starImage = Image(ImageGetter.getDrawable("StatIcons/Star.png").tint(Color.LIGHT_GRAY)) val starImage = Image(ImageGetter.getDrawable("OtherIcons/Star.png").tint(Color.LIGHT_GRAY))
add(starImage).size(20f).padLeft(10f) add(starImage).size(20f).padLeft(10f)
} }
add(label).pad(10f) add(label).pad(10f)

View File

@ -103,10 +103,10 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
tileGroups[unit.getTile()]!!.addWhiteHaloAroundUnit() tileGroups[unit.getTile()]!!.addWhiteHaloAroundUnit()
val attackableTiles:List<TileInfo> val attackableTiles:List<TileInfo>
when(unit.getBaseUnit().unitType){ when(unit.getBaseUnit().unitType){
UnitType.Civilian -> return UnitType.Civilian -> attackableTiles = listOf()
UnitType.Melee, UnitType.Mounted -> attackableTiles = unit.getDistanceToTiles().keys.toList() UnitType.Melee, UnitType.Mounted -> attackableTiles = unit.getDistanceToTiles().keys.toList()
UnitType.Archery, UnitType.Siege -> attackableTiles = unit.getTile().getTilesInDistance(2) UnitType.Archery, UnitType.Siege -> attackableTiles = unit.getTile().getTilesInDistance(2)
UnitType.City -> throw Exception("How are you attacking with a city?") UnitType.City -> throw Exception("A unit shouldn't have a City unittype!")
} }
for(tile: TileInfo in unit.getDistanceToTiles().keys) for(tile: TileInfo in unit.getDistanceToTiles().keys)

View File

@ -19,7 +19,7 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){
when(unitAction){ when(unitAction){
"Move unit" -> return ImageGetter.getStatIcon("Movement") "Move unit" -> return ImageGetter.getStatIcon("Movement")
"Stop movement"-> return ImageGetter.getStatIcon("Movement").apply { color= Color.RED } "Stop movement"-> return ImageGetter.getStatIcon("Movement").apply { color= Color.RED }
"Fortify" -> return ImageGetter.getImage("UnitIcons/Shield.png").apply { color= Color.BLACK } "Fortify" -> return ImageGetter.getImage("OtherIcons/Shield.png").apply { color= Color.BLACK }
"Construct improvement" -> return ImageGetter.getImage("UnitIcons/Worker.png") "Construct improvement" -> return ImageGetter.getImage("UnitIcons/Worker.png")
"Automate" -> return ImageGetter.getImage("UnitIcons/Great Engineer.png") "Automate" -> return ImageGetter.getImage("UnitIcons/Great Engineer.png")
"Stop automation" -> return ImageGetter.getImage("OtherIcons/Stop.png") "Stop automation" -> return ImageGetter.getImage("OtherIcons/Stop.png")
@ -32,7 +32,7 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){
"Construct Manufactory" -> return ImageGetter.getImage("ImprovementIcons/Manufactory_(Civ5).png") "Construct Manufactory" -> return ImageGetter.getImage("ImprovementIcons/Manufactory_(Civ5).png")
"Conduct Trade Mission" -> return ImageGetter.getImage("UnitIcons/Great Merchant.png") "Conduct Trade Mission" -> return ImageGetter.getImage("UnitIcons/Great Merchant.png")
"Construct Customs House" -> return ImageGetter.getImage("ImprovementIcons/Customs_house_(Civ5).png") "Construct Customs House" -> return ImageGetter.getImage("ImprovementIcons/Customs_house_(Civ5).png")
else -> return ImageGetter.getImage("StatIcons/Star.png") else -> return ImageGetter.getImage("OtherIcons/Star.png")
} }
} }