Stat icon organization

This commit is contained in:
Yair Morgenstern 2018-08-28 10:52:48 +03:00
parent 5d4c8a618d
commit b983de9599
21 changed files with 189 additions and 192 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 722 B

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 KiB

After

Width:  |  Height:  |  Size: 472 KiB

View file

@ -60,8 +60,8 @@ class BaseUnit : INamed, IConstruction, ICivilopedia {
if(strength!=0){
sb.append("{Strength} $strength".tr())
if(rangedStrength!=0) sb.append(", {Ranged strength}: $rangedStrength".tr())
sb.appendln()
if(rangedStrength!=0) sb.append(", {Range}: $range".tr())
sb.appendln()
}
if(uniques!=null){

View file

@ -87,7 +87,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
}
fun addPopulationIcon() {
populationImage = ImageGetter.getImage("StatIcons/20xPopulation5")
populationImage = ImageGetter.getStatIcon("Population")
populationImage!!.run {
color= Color.GREEN.cpy().lerp(Color.BLACK,0.5f)
setSize(20f, 20f)

View file

@ -48,12 +48,12 @@ object ImageGetter {
}
fun getStatIcon(statName: String): Image {
return ImageGetter.getImage("StatIcons/20x" + statName + "5.png")
return ImageGetter.getImage("StatIcons/$statName")
.apply { setSize(20f,20f)}
}
fun getUnitIcon(unitName:String):Image{
return getImage("UnitIcons/$unitName.png")
return getImage("UnitIcons/$unitName")
}
fun getImprovementIcon(improvementName:String, size:Float=20f):Actor{
@ -78,7 +78,7 @@ object ImageGetter {
}
fun getPromotionIcon(promotionName:String):Image{
return getImage("UnitPromotionIcons/" + promotionName.replace(' ', '_') + "_(Civ5).png")
return getImage("UnitPromotionIcons/" + promotionName.replace(' ', '_') + "_(Civ5)")
}
fun getBlue() = Color(0x004085bf)
@ -107,17 +107,14 @@ object ImageGetter {
val happiness = getStatIcon("Happiness")
happiness.setSize(size/2,size/2)
happiness.x = group.width-happiness.width
// happiness.y = group.height-happiness.height
group.addActor(happiness)
}
if(resource.resourceType==ResourceType.Strategic){
val production = getStatIcon("Production")
production.setSize(size/2,size/2)
production.x = group.width-production.width
// production.y = group.height-production.height
group.addActor(production)
}
return group
return getImage("ResourceIcons/${resourceName}")
}
}

View file

@ -18,8 +18,8 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){
return ImageGetter.getUnitIcon(unitToUpgradeTo)
}
when(unitAction){
"Move unit" -> return ImageGetter.getImage("StatIcons/20xMovement5")
"Stop movement"-> return ImageGetter.getImage("StatIcons/20xMovement5").apply { color= Color.RED }
"Move unit" -> return ImageGetter.getStatIcon("Movement")
"Stop movement"-> return ImageGetter.getStatIcon("Movement").apply { color= Color.RED }
"Fortify" -> return ImageGetter.getImage("OtherIcons/Shield.png").apply { color= Color.BLACK }
"Promote" -> return ImageGetter.getImage("OtherIcons/Star.png").apply { color= Color.GOLD }
"Construct improvement" -> return ImageGetter.getUnitIcon("Worker")