innerColor and outerColor function name changes
This commit is contained in:
parent
f6323edbc8
commit
bad10370de
9 changed files with 27 additions and 26 deletions
|
@ -51,10 +51,11 @@ class Nation : INamed {
|
|||
var startBias = ArrayList<String>()
|
||||
|
||||
|
||||
fun getColor(): Color {
|
||||
fun getOuterColor(): Color {
|
||||
return colorFromRGB(outerColor[0], outerColor[1], outerColor[2])
|
||||
}
|
||||
fun getSecondaryColor(): Color {
|
||||
|
||||
fun getInnerColor(): Color {
|
||||
if(innerColor==null) return Color.BLACK
|
||||
return colorFromRGB(innerColor!![0], innerColor!![1], innerColor!![2])
|
||||
}
|
||||
|
|
|
@ -122,12 +122,12 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||
private fun createOffersTable(civ: CivilizationInfo, offersList: TradeOffersList, numberOfOtherSidesOffers: Int): Table {
|
||||
val table = Table()
|
||||
table.defaults().pad(10f)
|
||||
table.background = ImageGetter.getBackground(civ.nation.getColor())
|
||||
table.add(civ.civName.toLabel().setFontColor(civ.nation.getSecondaryColor())).row()
|
||||
table.background = ImageGetter.getBackground(civ.nation.getOuterColor())
|
||||
table.add(civ.civName.toLabel().setFontColor(civ.nation.getInnerColor())).row()
|
||||
table.addSeparator()
|
||||
for(offer in offersList){
|
||||
val offerText = offer.getOfferText()
|
||||
table.add(offerText.toLabel().setFontColor(civ.nation.getSecondaryColor())).row()
|
||||
table.add(offerText.toLabel().setFontColor(civ.nation.getInnerColor())).row()
|
||||
}
|
||||
for(i in 1..numberOfOtherSidesOffers - offersList.size)
|
||||
table.add("".toLabel()).row() // we want both sides of the general table to have the same number of rows
|
||||
|
@ -416,8 +416,8 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||
label.setFontColor(Color.BLACK)
|
||||
} else if (currentPlayer==civ || UnCivGame.Current.viewEntireMapForDebug || currentPlayer.knows(civ)) {
|
||||
civGroup.add(ImageGetter.getNationIndicator(civ.nation, 30f))
|
||||
civGroup.background = civGroupBackground.tint(civ.nation.getColor())
|
||||
label.setFontColor(civ.nation.getSecondaryColor())
|
||||
civGroup.background = civGroupBackground.tint(civ.nation.getOuterColor())
|
||||
label.setFontColor(civ.nation.getInnerColor())
|
||||
} else {
|
||||
civGroup.background = civGroupBackground.tint(Color.DARK_GRAY)
|
||||
label.setText("???")
|
||||
|
|
|
@ -13,18 +13,18 @@ class NationTable(val nation: Nation, width:Float, onClick:()->Unit)
|
|||
: Table(CameraStageBaseScreen.skin){
|
||||
val innerTable = Table()
|
||||
init {
|
||||
background = ImageGetter.getBackground(nation.getSecondaryColor())
|
||||
background = ImageGetter.getBackground(nation.getInnerColor())
|
||||
innerTable.pad(10f)
|
||||
innerTable.background = ImageGetter.getBackground(nation.getColor())
|
||||
innerTable.background = ImageGetter.getBackground(nation.getOuterColor())
|
||||
|
||||
val titleTable = Table()
|
||||
titleTable.add(ImageGetter.getNationIndicator(nation, 50f)).pad(10f)
|
||||
titleTable.add(nation.getLeaderDisplayName().toLabel()
|
||||
.apply { setFontColor(nation.getSecondaryColor()); setFontSize(24) })
|
||||
.apply { setFontColor(nation.getInnerColor()); setFontSize(24) })
|
||||
innerTable.add(titleTable).row()
|
||||
|
||||
innerTable.add(getUniqueLabel(nation)
|
||||
.apply { setWrap(true);setFontColor(nation.getSecondaryColor()) })
|
||||
.apply { setWrap(true);setFontColor(nation.getInnerColor()) })
|
||||
.width(width)
|
||||
onClick {
|
||||
onClick()
|
||||
|
|
|
@ -45,10 +45,10 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||
|
||||
private fun addAirUnitTable() {
|
||||
if (!tileGroup.tileInfo.airUnits.isNotEmpty()) return
|
||||
val secondarycolor = city.civInfo.nation.getSecondaryColor()
|
||||
val secondarycolor = city.civInfo.nation.getInnerColor()
|
||||
val airUnitTable = Table().apply { defaults().pad(5f) }
|
||||
airUnitTable.background = ImageGetter.getDrawable("OtherIcons/civTableBackground")
|
||||
.tint(city.civInfo.nation.getColor())
|
||||
.tint(city.civInfo.nation.getOuterColor())
|
||||
val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft")
|
||||
aircraftImage.color = secondarycolor
|
||||
airUnitTable.add(aircraftImage).size(15f)
|
||||
|
@ -89,11 +89,11 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||
}
|
||||
|
||||
private fun getIconTable(): Table {
|
||||
val secondaryColor = city.civInfo.nation.getSecondaryColor()
|
||||
val secondaryColor = city.civInfo.nation.getInnerColor()
|
||||
val iconTable = Table()
|
||||
iconTable.touchable=Touchable.enabled
|
||||
iconTable.background = ImageGetter.getDrawable("OtherIcons/civTableBackground")
|
||||
.tint(city.civInfo.nation.getColor())
|
||||
.tint(city.civInfo.nation.getOuterColor())
|
||||
|
||||
if (city.resistanceCounter > 0) {
|
||||
val resistanceImage = ImageGetter.getImage("StatIcons/Resistance")
|
||||
|
@ -170,7 +170,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||
group.addActor(circle)
|
||||
group.addActor(image)
|
||||
|
||||
val secondaryColor = cityConstructions.cityInfo.civInfo.nation.getSecondaryColor()
|
||||
val secondaryColor = cityConstructions.cityInfo.civInfo.nation.getInnerColor()
|
||||
val cityCurrentConstruction = cityConstructions.getCurrentConstruction()
|
||||
if(cityCurrentConstruction !is SpecialConstruction) {
|
||||
val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name)
|
||||
|
|
|
@ -278,7 +278,7 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
|
|||
previousTileOwner = tileOwner
|
||||
if (tileOwner == null) return
|
||||
|
||||
val civColor = tileInfo.getOwner()!!.nation.getColor()
|
||||
val civColor = tileInfo.getOwner()!!.nation.getOuterColor()
|
||||
for (neighbor in tileInfo.neighbors) {
|
||||
val neighborOwner = neighbor.getOwner()
|
||||
if (neighborOwner == tileOwner && borderImages.containsKey(neighbor)) // the neighbor used to not belong to us, but now it's ours
|
||||
|
|
|
@ -67,15 +67,15 @@ object ImageGetter {
|
|||
}
|
||||
|
||||
fun getNationIndicator(nation: Nation, size:Float): IconCircleGroup {
|
||||
val civIndicator = getCircle().apply { color = nation.getSecondaryColor() }
|
||||
.surroundWithCircle(size).apply { circle.color = nation.getColor() }
|
||||
val civIndicator = getCircle().apply { color = nation.getInnerColor() }
|
||||
.surroundWithCircle(size).apply { circle.color = nation.getOuterColor() }
|
||||
|
||||
val civIconName = if(nation.isCityState()) "CityState" else nation.name
|
||||
if(nationIconExists(civIconName)){
|
||||
val cityStateIcon = ImageGetter.getNationIcon(civIconName)
|
||||
cityStateIcon.setSize(size*0.7f,size*0.7f)
|
||||
cityStateIcon.center(civIndicator)
|
||||
cityStateIcon.color = nation.getColor()
|
||||
cityStateIcon.color = nation.getOuterColor()
|
||||
civIndicator.addActor(cityStateIcon)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ class UnitGroup(val unit: MapUnit, val size: Float): Group() {
|
|||
var blackSpinningCircle:Image?=null
|
||||
|
||||
init {
|
||||
val unitBaseImage = ImageGetter.getUnitIcon(unit.name, unit.civInfo.nation.getSecondaryColor())
|
||||
val unitBaseImage = ImageGetter.getUnitIcon(unit.name, unit.civInfo.nation.getInnerColor())
|
||||
.apply { setSize(size * 0.75f, size * 0.75f) }
|
||||
|
||||
val background = getBackgroundImageForUnit(unit)
|
||||
background.apply {
|
||||
this.color = unit.civInfo.nation.getColor()
|
||||
this.color = unit.civInfo.nation.getOuterColor()
|
||||
setSize(size, size)
|
||||
}
|
||||
setSize(size, size)
|
||||
|
|
|
@ -78,9 +78,9 @@ class Minimap(val tileMapHolder: TileMapHolder) : ScrollPane(null){
|
|||
if (!(UnCivGame.Current.viewEntireMapForDebug || cloneCivilization.exploredTiles.contains(tileInfo.position)))
|
||||
hex.color = Color.DARK_GRAY
|
||||
else if (tileInfo.isCityCenter() && !tileInfo.isWater)
|
||||
hex.color = tileInfo.getOwner()!!.nation.getSecondaryColor()
|
||||
hex.color = tileInfo.getOwner()!!.nation.getInnerColor()
|
||||
else if (tileInfo.getCity() != null && !tileInfo.isWater)
|
||||
hex.color = tileInfo.getOwner()!!.nation.getColor()
|
||||
hex.color = tileInfo.getOwner()!!.nation.getOuterColor()
|
||||
else hex.color = tileInfo.getBaseTerrain().getColor().lerp(Color.GRAY, 0.5f)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ class PlayerReadyScreen(currentPlayerCiv: CivilizationInfo) : CameraStageBaseScr
|
|||
init {
|
||||
val table= Table()
|
||||
table.touchable= Touchable.enabled
|
||||
table.background= ImageGetter.getBackground(currentPlayerCiv.nation.getColor())
|
||||
table.background= ImageGetter.getBackground(currentPlayerCiv.nation.getOuterColor())
|
||||
|
||||
table.add("[$currentPlayerCiv] ready?".toLabel().setFontSize(24)
|
||||
.setFontColor(currentPlayerCiv.nation.getSecondaryColor()))
|
||||
.setFontColor(currentPlayerCiv.nation.getInnerColor()))
|
||||
|
||||
table.onClick {
|
||||
UnCivGame.Current.worldScreen = WorldScreen(currentPlayerCiv)
|
||||
|
|
Loading…
Reference in a new issue