diff --git a/core/src/com/unciv/models/ruleset/nation/Nation.kt b/core/src/com/unciv/models/ruleset/nation/Nation.kt index 8546664e6c..1bbde69ad4 100644 --- a/core/src/com/unciv/models/ruleset/nation/Nation.kt +++ b/core/src/com/unciv/models/ruleset/nation/Nation.kt @@ -12,6 +12,7 @@ import com.unciv.models.ruleset.unique.UniqueType import com.unciv.models.translations.squareBraceRegex import com.unciv.models.translations.tr import com.unciv.ui.components.extensions.colorFromRGB +import com.unciv.ui.images.ImageGetter import com.unciv.ui.objectdescriptions.BaseUnitDescriptions import com.unciv.ui.objectdescriptions.BuildingDescriptions import com.unciv.ui.objectdescriptions.ImprovementDescriptions @@ -94,7 +95,7 @@ class Nation : RulesetObject() { fun setTransients() { outerColorObject = colorFromRGB(outerColor) - innerColorObject = if (innerColor == null) Color.BLACK + innerColorObject = if (innerColor == null) ImageGetter.CHARCOAL else colorFromRGB(innerColor!!) forestsAndJunglesAreRoads = uniqueMap.hasUnique(UniqueType.ForestsAndJunglesAreRoads) diff --git a/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt b/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt index 39357fccc5..5213271651 100644 --- a/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt +++ b/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt @@ -22,6 +22,7 @@ import com.unciv.models.stats.Stats import com.unciv.models.tilesets.TileSetCache import com.unciv.models.tilesets.TileSetConfig import com.unciv.ui.images.AtlasPreview +import com.unciv.ui.images.ImageGetter import com.unciv.ui.images.Portrait import com.unciv.ui.images.PortraitPromotion @@ -724,9 +725,9 @@ class RulesetValidator(val ruleset: Ruleset) { if (innerColorLuminance > outerColorLuminance) { // inner is brighter innerLerpColor = Color.WHITE - outerLerpColor = Color.BLACK + outerLerpColor = ImageGetter.CHARCOAL } else { - innerLerpColor = Color.BLACK + innerLerpColor = ImageGetter.CHARCOAL outerLerpColor = Color.WHITE } diff --git a/core/src/com/unciv/models/tilesets/TileSetConfig.kt b/core/src/com/unciv/models/tilesets/TileSetConfig.kt index b2fa4f5fe2..2d626cae76 100644 --- a/core/src/com/unciv/models/tilesets/TileSetConfig.kt +++ b/core/src/com/unciv/models/tilesets/TileSetConfig.kt @@ -2,12 +2,13 @@ package com.unciv.models.tilesets import com.badlogic.gdx.graphics.Color import com.unciv.Constants +import com.unciv.ui.images.ImageGetter class TileSetConfig { var useColorAsBaseTerrain = false var useSummaryImages = false var unexploredTileColor: Color = Color.DARK_GRAY - var fogOfWarColor: Color = Color.BLACK + var fogOfWarColor: Color = ImageGetter.CHARCOAL /** Name of the tileset to use when this one is missing images. Null to disable. */ var fallbackTileSet: String? = Constants.defaultFallbackTileset /** Scale factor for hex images, with hex center as origin. */ diff --git a/core/src/com/unciv/ui/components/ISortableGridContentProvider.kt b/core/src/com/unciv/ui/components/ISortableGridContentProvider.kt index d3a7c8948e..beea41e250 100644 --- a/core/src/com/unciv/ui/components/ISortableGridContentProvider.kt +++ b/core/src/com/unciv/ui/components/ISortableGridContentProvider.kt @@ -87,7 +87,7 @@ interface ISortableGridContentProvider { @JvmStatic fun getCircledIcon(path: String, iconSize: Float, circleColor: Color = Color.LIGHT_GRAY) = ImageGetter.getImage(path) - .apply { color = Color.BLACK } + .apply { color = ImageGetter.CHARCOAL } .surroundWithCircle(iconSize, color = circleColor) @JvmStatic diff --git a/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt b/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt index 4ad273a0a2..b462163c3d 100644 --- a/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt +++ b/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt @@ -91,9 +91,9 @@ fun colorFromHex(hexColor: Int): Color { fun colorFromRGB(r: Int, g: Int, b: Int) = Color(r / 255f, g / 255f, b / 255f, 1f) /** Create a new [Color] instance from r/g/b given as Integers in the range 0..255 in the form of a 3-element List [rgb] */ fun colorFromRGB(rgb: List) = colorFromRGB(rgb[0], rgb[1], rgb[2]) -/** Linearly interpolates between this [Color] and [BLACK][Color.BLACK] by [t] which is in the range [[0,1]]. +/** Linearly interpolates between this [Color] and [BLACK][ImageGetter.CHARCOAL] by [t] which is in the range [[0,1]]. * The result is returned as a new instance. */ -fun Color.darken(t: Float): Color = Color(this).lerp(Color.BLACK, t) +fun Color.darken(t: Float): Color = Color(this).lerp(ImageGetter.CHARCOAL, t) /** Linearly interpolates between this [Color] and [WHITE][Color.WHITE] by [t] which is in the range [[0,1]]. * The result is returned as a new instance. */ fun Color.brighten(t: Float): Color = Color(this).lerp(Color.WHITE, t) @@ -117,7 +117,7 @@ fun Actor.surroundWithCircle( return IconCircleGroup(size, this, resizeActor, color, circleImageLocation) } -fun Actor.surroundWithThinCircle(color: Color=Color.BLACK): IconCircleGroup = surroundWithCircle(width+2f, false, color) +fun Actor.surroundWithThinCircle(color: Color=ImageGetter.CHARCOAL): IconCircleGroup = surroundWithCircle(width+2f, false, color) fun Actor.addBorder(size: Float, color: Color, expandCell: Boolean = false): Table { diff --git a/core/src/com/unciv/ui/components/tilegroups/CityButton.kt b/core/src/com/unciv/ui/components/tilegroups/CityButton.kt index 6b11d227d0..9b27813286 100644 --- a/core/src/com/unciv/ui/components/tilegroups/CityButton.kt +++ b/core/src/com/unciv/ui/components/tilegroups/CityButton.kt @@ -51,7 +51,7 @@ class InfluenceTable( setSize(width, height) background = BaseScreen.skinStrings.getUiBackground( "WorldScreen/CityButton/InfluenceBar", - tintColor = Color.BLACK) + tintColor = ImageGetter.CHARCOAL) val normalizedInfluence = max(-60f, min(influence, 60f)) / 30f @@ -115,11 +115,11 @@ private class DefenceTable(city: City) : BorderedTable( val selectedCiv = GUI.getSelectedPlayer() borderSize = 4f - bgColor = Color.BLACK + bgColor = ImageGetter.CHARCOAL bgBorderColor = when { city.civ == selectedCiv -> colorFromRGB(255, 237, 200) city.civ.isAtWarWith(selectedCiv) -> Color.RED - else -> Color.BLACK + else -> ImageGetter.CHARCOAL } pad(2f, 3f, 0f, 3f) @@ -216,7 +216,7 @@ private class CityTable(city: City, forPopup: Boolean = false) : BorderedTable( bgBorderColor = when { city.civ == selectedCiv -> colorFromRGB(233, 233, 172) city.civ.isAtWarWith(selectedCiv) -> colorFromRGB(230, 51, 0) - else -> Color.BLACK + else -> ImageGetter.CHARCOAL } borderSize = when { city.civ == selectedCiv -> 4f @@ -269,7 +269,7 @@ private class CityTable(city: City, forPopup: Boolean = false) : BorderedTable( val growthBar = ImageGetter.getProgressBarVertical(4f, 30f, if (city.isStarving()) 1.0f else growthPercentage, - if (city.isStarving()) Color.RED else CityButton.ColorGrowth, Color.BLACK, 1f) + if (city.isStarving()) Color.RED else CityButton.ColorGrowth, ImageGetter.CHARCOAL, 1f) growthBar.color.a = 0.8f val turnLabelText = when { @@ -367,7 +367,7 @@ private class CityTable(city: City, forPopup: Boolean = false) : BorderedTable( } val productionBar = ImageGetter.getProgressBarVertical(4f, 30f, percentage, - CityButton.ColorConstruction, Color.BLACK, 1f) + CityButton.ColorConstruction, ImageGetter.CHARCOAL, 1f) productionBar.setSemiProgress(CityButton.ColorConstruction.cpy().darken(0.4f), nextTurnPercentage, 1f) productionBar.color.a = 0.8f diff --git a/core/src/com/unciv/ui/components/tilegroups/YieldGroup.kt b/core/src/com/unciv/ui/components/tilegroups/YieldGroup.kt index aa3ea89815..39a0b5df0d 100644 --- a/core/src/com/unciv/ui/components/tilegroups/YieldGroup.kt +++ b/core/src/com/unciv/ui/components/tilegroups/YieldGroup.kt @@ -32,7 +32,7 @@ class YieldGroup : HorizontalGroup() { fun getIcon(statName: String) = ImageGetter.getStatIcon(statName).surroundWithCircle(12f) - .apply { circle.color = Color.BLACK;circle.color.a = 0.5f } + .apply { circle.color = ImageGetter.CHARCOAL; circle.color.a = 0.5f } private fun getStatIconsTable(statName: String, number: Int): Table { val table = Table() @@ -57,7 +57,7 @@ class YieldGroup : HorizontalGroup() { val group = Group().apply { setSize(22f, 22f) } val largeImage = ImageGetter.getStatIcon(statName).surroundWithCircle(22f) - .apply { circle.color = Color.BLACK;circle.color.a = 0.5f } + .apply { circle.color = ImageGetter.CHARCOAL;circle.color.a = 0.5f } group.addToCenter(largeImage) if (number > 5) { @@ -67,7 +67,7 @@ class YieldGroup : HorizontalGroup() { fontColor = Color.WHITE, alignment = Align.center ) - val amountGroup = label.surroundWithCircle(10f, true, Color.BLACK) + val amountGroup = label.surroundWithCircle(10f, true, ImageGetter.CHARCOAL) label.y -= 0.5f amountGroup.x = group.width - amountGroup.width * 3 / 4 amountGroup.y = -amountGroup.height / 4 diff --git a/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt b/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt index 8be1edd463..62d377ec20 100644 --- a/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt +++ b/core/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt @@ -214,7 +214,7 @@ class TileLayerMisc(tileGroup: TileGroup, size: Float) : TileLayer(tileGroup, si if (DebugUtils.SHOW_TILE_COORDS) { val label = this.tile().position.toPrettyString() - startingLocationIcons.add(label.toLabel(Color.BLACK.cpy().apply { a = 0.7f }, 14).apply { + startingLocationIcons.add(label.toLabel(ImageGetter.CHARCOAL.cpy().apply { a = 0.7f }, 14).apply { tileGroup.layerMisc.addActor(this) setOrigin(Align.center) center(tileGroup) @@ -265,7 +265,7 @@ class TileLayerMisc(tileGroup: TileGroup, size: Float) : TileLayer(tileGroup, si // Add a Label with the total count for this tile if (nations.size > 3) { // Tons of locations for this tile - display number in red, behind the top three - startingLocationIcons.add(nations.size.tr().toLabel(Color.BLACK.cpy().apply { a = 0.7f }, 14).apply { + startingLocationIcons.add(nations.size.tr().toLabel(ImageGetter.CHARCOAL.cpy().apply { a = 0.7f }, 14).apply { tileGroup.layerMisc.addActor(this) setOrigin(Align.center) center(tileGroup) diff --git a/core/src/com/unciv/ui/components/widgets/BorderedTable.kt b/core/src/com/unciv/ui/components/widgets/BorderedTable.kt index 546ebc3016..9d4065ddab 100644 --- a/core/src/com/unciv/ui/components/widgets/BorderedTable.kt +++ b/core/src/com/unciv/ui/components/widgets/BorderedTable.kt @@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.g2d.Batch import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.utils.Drawable +import com.unciv.ui.images.ImageGetter import com.unciv.ui.screens.basescreen.BaseScreen /** @@ -22,7 +23,7 @@ open class BorderedTable( * that parser still works! */ - var bgColor: Color = Color.BLACK + var bgColor: Color = ImageGetter.CHARCOAL var bgBorderColor: Color = Color.WHITE var borderSize: Float = 5f diff --git a/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt b/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt index db437ba023..b3417dd579 100644 --- a/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt +++ b/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt @@ -8,6 +8,7 @@ import com.badlogic.gdx.utils.Align import com.unciv.Constants import com.unciv.models.translations.tr import com.unciv.ui.components.extensions.toLabel +import com.unciv.ui.images.ImageGetter /** * A widget containing two [Label]s superimposed with an offset to create a shadow effect. @@ -28,7 +29,7 @@ class ShadowedLabel( text: String, fontSize: Int = Constants.defaultFontSize, labelColor: Color = Color.WHITE, - shadowColor: Color = Color.BLACK, + shadowColor: Color = ImageGetter.CHARCOAL, hideIcons: Boolean = true, shadowOffset: Float = 1f ) : Stack() { diff --git a/core/src/com/unciv/ui/components/widgets/UncivSlider.kt b/core/src/com/unciv/ui/components/widgets/UncivSlider.kt index 9cc463d92b..d911d237a0 100644 --- a/core/src/com/unciv/ui/components/widgets/UncivSlider.kt +++ b/core/src/com/unciv/ui/components/widgets/UncivSlider.kt @@ -27,6 +27,7 @@ import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.input.onClick import com.unciv.ui.components.widgets.UncivSlider.Companion.formatPercent import com.unciv.ui.images.IconCircleGroup +import com.unciv.ui.images.ImageGetter import com.unciv.ui.screens.basescreen.BaseScreen import kotlin.math.abs import kotlin.math.sign @@ -155,7 +156,7 @@ class UncivSlider ( stepChanged() // Initialize tip formatting if (plusMinus) { - minusButton = "-".toLabel(Color.BLACK, plusMinusFontSize) + minusButton = "-".toLabel(ImageGetter.CHARCOAL, plusMinusFontSize) .apply { setAlignment(Align.center) } .surroundWithCircle(plusMinusCircleSize) minusButton.onClick { @@ -171,7 +172,7 @@ class UncivSlider ( if (plusMinus) { if (vertical) row() - plusButton = "+".toLabel(Color.BLACK, plusMinusFontSize) + plusButton = "+".toLabel(ImageGetter.CHARCOAL, plusMinusFontSize) .apply { setAlignment(Align.center) } .surroundWithCircle(plusMinusCircleSize) plusButton.onClick { diff --git a/core/src/com/unciv/ui/images/ImageGetter.kt b/core/src/com/unciv/ui/images/ImageGetter.kt index 9dd8a680c0..5a9174a62c 100644 --- a/core/src/com/unciv/ui/images/ImageGetter.kt +++ b/core/src/com/unciv/ui/images/ImageGetter.kt @@ -47,6 +47,7 @@ import kotlin.math.sqrt object ImageGetter { const val whiteDotLocation = "OtherIcons/whiteDot" const val circleLocation = "OtherIcons/Circle" + val CHARCOAL = Color(0x333333FF) // We use texture atlases to minimize texture swapping - see https://yairm210.medium.com/the-libgdx-performance-guide-1d068a84e181 lateinit var atlas: TextureAtlas @@ -254,7 +255,7 @@ object ImageGetter { fun getRandomNationPortrait(size: Float): Portrait = PortraitNation(Constants.random, size) - fun getUnitIcon(unit: BaseUnit, color: Color = Color.BLACK): Image = + fun getUnitIcon(unit: BaseUnit, color: Color = CHARCOAL): Image = if (imageExists("UnitIcons/${unit.name}")) getImage("UnitIcons/${unit.name}").apply { this.color = color } else getImage("UnitTypeIcons/${unit.type}").apply { this.color = color } @@ -430,12 +431,12 @@ object ImageGetter { } healthBar.add(healthPartOfBar).size(healthBarSize * healthPercent, height) - val emptyPartOfBar = getDot(Color.BLACK) + val emptyPartOfBar = getDot(CHARCOAL) healthBar.add(emptyPartOfBar).size(healthBarSize * (1 - healthPercent), height) healthBar.pad(1f) healthBar.pack() - healthBar.background = BaseScreen.skinStrings.getUiBackground("General/HealthBar", tintColor = Color.BLACK) + healthBar.background = BaseScreen.skinStrings.getUiBackground("General/HealthBar", tintColor = CHARCOAL) return healthBar } diff --git a/core/src/com/unciv/ui/images/Portrait.kt b/core/src/com/unciv/ui/images/Portrait.kt index 8fa6daa970..4a521943a8 100644 --- a/core/src/com/unciv/ui/images/Portrait.kt +++ b/core/src/com/unciv/ui/images/Portrait.kt @@ -147,7 +147,7 @@ class PortraitResource(name: String, size: Float, amount: Int = 0) : Portrait(Ty fontSize = 8, fontColor = Color.WHITE, alignment = Align.center) - val amountGroup = label.surroundWithCircle(size/2, true, Color.BLACK) + val amountGroup = label.surroundWithCircle(size/2, true, ImageGetter.CHARCOAL) label.y -= 0.5f amountGroup.x = width - amountGroup.width * 3 / 4 @@ -164,7 +164,7 @@ class PortraitResource(name: String, size: Float, amount: Int = 0) : Portrait(Ty class PortraitTech(name: String, size: Float) : Portrait(Type.Tech, name, size) { override fun getDefaultOuterBackgroundTint(): Color = getDefaultImageTint() override fun getDefaultImageTint(): Color = - ruleset.eras[ruleset.technologies[imageName]?.era()]?.getColor()?.darken(0.6f) ?: Color.BLACK + ruleset.eras[ruleset.technologies[imageName]?.era()]?.getColor()?.darken(0.6f) ?: ImageGetter.CHARCOAL } class PortraitUnit(name: String, size: Float) : Portrait(Type.Unit, name, size) { @@ -180,15 +180,15 @@ class PortraitUnavailableWonderForTechTree(name: String, size: Float) : Portrait } class PortraitUnique(name: String, size: Float) : Portrait(Type.Unique, name, size) { - override fun getDefaultImageTint(): Color = Color.BLACK + override fun getDefaultImageTint(): Color = ImageGetter.CHARCOAL } class PortraitReligion(name: String, size: Float) : Portrait(Type.Religion, name, size) { - override fun getDefaultImageTint(): Color = Color.BLACK + override fun getDefaultImageTint(): Color = ImageGetter.CHARCOAL } class PortraitUnitAction(name: String, size: Float) : Portrait(Type.UnitAction, name, size) { - override fun getDefaultImageTint(): Color = Color.BLACK + override fun getDefaultImageTint(): Color = ImageGetter.CHARCOAL } class PortraitImprovement(name: String, size: Float, dim: Boolean = false, isPillaged: Boolean = false) : Portrait(Type.Improvement, name, size) { @@ -236,7 +236,7 @@ class PortraitNation(name: String, size: Float) : Portrait(Type.Nation, name, si } override fun getDefaultInnerBackgroundTint(): Color = - ruleset.nations[imageName]?.getOuterColor() ?: Color.BLACK + ruleset.nations[imageName]?.getOuterColor() ?: ImageGetter.CHARCOAL override fun getDefaultOuterBackgroundTint(): Color = getDefaultImageTint() override fun getDefaultImageTint(): Color = ruleset.nations[imageName]?.getInnerColor() ?: Color.WHITE diff --git a/core/src/com/unciv/ui/popups/AskNumberPopup.kt b/core/src/com/unciv/ui/popups/AskNumberPopup.kt index 3ef132a5d6..d7cf822955 100644 --- a/core/src/com/unciv/ui/popups/AskNumberPopup.kt +++ b/core/src/com/unciv/ui/popups/AskNumberPopup.kt @@ -30,7 +30,7 @@ import com.unciv.ui.screens.basescreen.BaseScreen class AskNumberPopup( screen: BaseScreen, label: String = "Please enter a number", - icon: IconCircleGroup = ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = Color.BLACK }.surroundWithCircle(80f), + icon: IconCircleGroup = ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = ImageGetter.CHARCOAL }.surroundWithCircle(80f), defaultValue: String = "", amountButtons: List = listOf(), bounds: IntRange = IntRange(Int.MIN_VALUE, Int.MAX_VALUE), diff --git a/core/src/com/unciv/ui/popups/AskTextPopup.kt b/core/src/com/unciv/ui/popups/AskTextPopup.kt index 4a6ce30160..fa12abf5ca 100644 --- a/core/src/com/unciv/ui/popups/AskTextPopup.kt +++ b/core/src/com/unciv/ui/popups/AskTextPopup.kt @@ -24,7 +24,7 @@ import com.unciv.ui.components.extensions.toLabel class AskTextPopup( screen: BaseScreen, label: String = "Please enter some text", - icon: Group = ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = Color.BLACK }.surroundWithCircle(80f), + icon: Group = ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = ImageGetter.CHARCOAL }.surroundWithCircle(80f), defaultText: String = "", errorText: String = "Invalid input! Please enter a different string.", maxLength: Int = 32, diff --git a/core/src/com/unciv/ui/popups/options/ModCheckTab.kt b/core/src/com/unciv/ui/popups/options/ModCheckTab.kt index f165833369..f05a2c9478 100644 --- a/core/src/com/unciv/ui/popups/options/ModCheckTab.kt +++ b/core/src/com/unciv/ui/popups/options/ModCheckTab.kt @@ -120,7 +120,7 @@ class ModCheckTab( else -> "OtherIcons/Checkmark" } val icon = ImageGetter.getImage(iconName) - .apply { color = Color.BLACK } + .apply { color = ImageGetter.CHARCOAL } .surroundWithCircle(30f, color = iconColor) val expanderTab = ExpanderTab(mod.name, icon = icon, startsOutOpened = mod.name in openedExpanderTitles) { diff --git a/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt b/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt index 9717998bf0..a0a2dc744a 100644 --- a/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt +++ b/core/src/com/unciv/ui/screens/UniqueBuilderScreen.kt @@ -85,7 +85,7 @@ class UniqueTable(isMainUnique: Boolean, val ruleset: Ruleset, stage: Stage, .filter { it.modifierType != UniqueTarget.ModifierType.None } defaults().pad(10f) - background = ImageGetter.getWhiteDotDrawable().tint(Color.BLACK.cpy().apply { a=0.3f }) + background = ImageGetter.getWhiteDotDrawable().tint(ImageGetter.CHARCOAL.cpy().apply { a=0.3f }) val uniqueTargetSelectBoxTable = Table().apply { defaults().pad(5f) } uniqueTargetsSelectBox = SelectBox(BaseScreen.skin) uniqueTargetsSelectBox.setItems(uniqueTargets) diff --git a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt index ef2c7d655a..3e67358749 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt @@ -93,7 +93,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { constructionsQueueScrollPane.setOverscroll(false, false) constructionsQueueTable.background = BaseScreen.skinStrings.getUiBackground( "CityScreen/CityConstructionTable/ConstructionsQueueTable", - tintColor = Color.BLACK + tintColor = ImageGetter.CHARCOAL ) upperTable.defaults().left().top() @@ -106,7 +106,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { availableConstructionsScrollPane.setOverscroll(false, false) availableConstructionsTable.background = BaseScreen.skinStrings.getUiBackground( "CityScreen/CityConstructionTable/AvailableConstructionsTable", - tintColor = Color.BLACK + tintColor = ImageGetter.CHARCOAL ) lowerTableScrollCell = lowerTable.add(availableConstructionsScrollPane).bottom() lowerTable.row() @@ -383,7 +383,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { else BaseScreen.skinStrings.getUiBackground( "CityScreen/CityConstructionTable/QueueEntry", - tintColor = Color.BLACK + tintColor = ImageGetter.CHARCOAL ) } @@ -442,7 +442,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { if (!cannotAddConstructionToQueue(construction, cityScreen.city, cityScreen.city.cityConstructions)) { val addToQueueButton = ImageGetter.getImage("OtherIcons/New") - .apply { color = Color.BLACK }.surroundWithCircle(40f) + .apply { color = ImageGetter.CHARCOAL }.surroundWithCircle(40f) addToQueueButton.onClick(UncivSound.Silent) { // Since the pickConstructionButton.onClick adds the construction if it's selected, // this effectively adds the construction even if it's unselected @@ -502,7 +502,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { // Lazy because possibly not needed (highlight true, clearOthers false) and slightly costly BaseScreen.skinStrings.getUiBackground( "CityScreen/CityConstructionTable/PickConstructionButton", - tintColor = Color.BLACK + tintColor = ImageGetter.CHARCOAL ) } @@ -585,7 +585,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { movePriority: (Int) -> Int ): Table { val button = Table() - button.add(ImageGetter.getArrowImage(arrowDirection).apply { color = Color.BLACK }.surroundWithCircle(40f)) + button.add(ImageGetter.getArrowImage(arrowDirection).apply { color = ImageGetter.CHARCOAL }.surroundWithCircle(40f)) button.touchable = Touchable.enabled // Don't bind the queue reordering keys here - those should affect only the selected entry, not all of them button.onActivation { diff --git a/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt b/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt index 076111644a..484ae7c523 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt @@ -57,7 +57,7 @@ class CityStatsTable(private val cityScreen: CityScreen) : Table() { innerTable.pad(5f) innerTable.background = BaseScreen.skinStrings.getUiBackground( "CityScreen/CityStatsTable/InnerTable", - tintColor = Color.BLACK.cpy().apply { a = 0.8f } + tintColor = ImageGetter.CHARCOAL.cpy().apply { a = 0.8f } ) upperTable.defaults().pad(2f) @@ -388,7 +388,7 @@ class CityStatsTable(private val cityScreen: CityScreen) : Table() { val percent = gppCurrent / gppNeeded.toFloat() val progressBar = ImageGetter.ProgressBar(300f, 25f, false) - progressBar.setBackground(Color.BLACK.cpy().apply { a = 0.8f }) + progressBar.setBackground(ImageGetter.CHARCOAL.cpy().apply { a = 0.8f }) progressBar.setProgress(Color.ORANGE, percent) progressBar.apply { val bar = ImageGetter.getWhiteDot() diff --git a/core/src/com/unciv/ui/screens/cityscreen/SpecialistAllocationTable.kt b/core/src/com/unciv/ui/screens/cityscreen/SpecialistAllocationTable.kt index 83c121d714..49988a07f5 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/SpecialistAllocationTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/SpecialistAllocationTable.kt @@ -83,7 +83,7 @@ class SpecialistAllocationTable(private val cityScreen: CityScreen) : Table(Base private fun getAssignButton(assignedSpecialists: Int, maxSpecialists: Int, specialistName: String): Actor { if (assignedSpecialists >= maxSpecialists || city.isPuppet) return Table() - val assignButton = "+".toLabel(Color.BLACK, Constants.headingFontSize) + val assignButton = "+".toLabel(ImageGetter.CHARCOAL, Constants.headingFontSize) .apply { this.setAlignment(Align.center) } .surroundWithCircle(30f).apply { circle.color = Color.GREEN.darken(0.2f) } assignButton.onClick { @@ -98,7 +98,7 @@ class SpecialistAllocationTable(private val cityScreen: CityScreen) : Table(Base } private fun getUnassignButton(assignedSpecialists: Int, specialistName: String): Actor { - val unassignButton = "-".toLabel(Color.BLACK, Constants.headingFontSize) + val unassignButton = "-".toLabel(ImageGetter.CHARCOAL, Constants.headingFontSize) .apply { this.setAlignment(Align.center) } .surroundWithCircle(30f).apply { circle.color = Color.RED.darken(0.1f) } unassignButton.onClick { diff --git a/core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaImageGetters.kt b/core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaImageGetters.kt index d7eb0e4d4c..8d7b3861bb 100644 --- a/core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaImageGetters.kt +++ b/core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaImageGetters.kt @@ -75,7 +75,7 @@ internal object CivilopediaImageGetters { }.surroundWithCircle(size) return null } - return tryImage("$policyBranchIconFolder/$name", Color.BLACK) + return tryImage("$policyBranchIconFolder/$name", ImageGetter.CHARCOAL) ?: tryImage("$policyIconFolder/$name", Color.BROWN) } val resource = { name: String, size: Float -> diff --git a/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt b/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt index b6b461652b..b4a06bbbaf 100644 --- a/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt @@ -156,7 +156,7 @@ class DiplomacyScreen( val innerColor = civ.gameInfo.ruleset.nations[civ.civName]!!.getInnerColor() val typeIcon = ImageGetter.getImage("CityStateIcons/"+civ.cityStateType.name) .surroundWithCircle(size = 35f, color = innerColor).apply { - actor.color = Color.BLACK + actor.color = ImageGetter.CHARCOAL } civIndicator.addActor(typeIcon) typeIcon.y = floor(civIndicator.height - typeIcon.height) diff --git a/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt b/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt index c391ac4b6a..0fd89ff4a2 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt @@ -514,7 +514,7 @@ private class RandomNationPickerPopup( const val buttonsCircleSize = 70f const val buttonsIconSize = 50f const val buttonsOffsetFromEdge = 5f - val buttonsBackColor: Color = Color.BLACK.cpy().apply { a = 0.67f } + val buttonsBackColor: Color = ImageGetter.CHARCOAL.cpy().apply { a = 0.67f } } // This Popup's body has two halves of same size, either side by side or arranged vertically diff --git a/core/src/com/unciv/ui/screens/newgamescreen/NationPickerPopup.kt b/core/src/com/unciv/ui/screens/newgamescreen/NationPickerPopup.kt index 25bf4caec5..34585a3f33 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/NationPickerPopup.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/NationPickerPopup.kt @@ -45,7 +45,7 @@ internal class NationPickerPopup( const val buttonsCircleSize = 70f const val buttonsIconSize = 50f const val buttonsOffsetFromEdge = 5f - val buttonsBackColor: Color = Color.BLACK.cpy().apply { a = 0.67f } + val buttonsBackColor: Color = ImageGetter.CHARCOAL.cpy().apply { a = 0.67f } // Icon view sizing const val iconViewIconSize = 50f // Portrait lies and will be bigger than asked for (55f) const val iconViewCellSize = 60f // Difference to the above is used for selection highlight diff --git a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt index 81d7aa8b22..e4090b177c 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt @@ -225,9 +225,9 @@ class NewGameScreen( scrollPane.setScrollingDisabled(true,true) topTable.add("Game Options".toLabel(fontSize = Constants.headingFontSize)).pad(20f, 0f) - topTable.addSeparatorVertical(Color.BLACK, 1f) + topTable.addSeparatorVertical(ImageGetter.CHARCOAL, 1f) topTable.add("Map Options".toLabel(fontSize = Constants.headingFontSize)).pad(20f,0f) - topTable.addSeparatorVertical(Color.BLACK, 1f) + topTable.addSeparatorVertical(ImageGetter.CHARCOAL, 1f) topTable.add("Civilizations".toLabel(fontSize = Constants.headingFontSize)).pad(20f,0f) topTable.addSeparator(Color.CLEAR, height = 1f) diff --git a/core/src/com/unciv/ui/screens/newgamescreen/PlayerPickerTable.kt b/core/src/com/unciv/ui/screens/newgamescreen/PlayerPickerTable.kt index ac480f9333..010506977d 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/PlayerPickerTable.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/PlayerPickerTable.kt @@ -100,7 +100,7 @@ class PlayerPickerTable( } if (!locked && gameParameters.players.size < gameBasics.nations.values.count { it.isMajorCiv }) { - val addPlayerButton = "+".toLabel(Color.BLACK, 30) + val addPlayerButton = "+".toLabel(ImageGetter.CHARCOAL, 30) .apply { this.setAlignment(Align.center) } .surroundWithCircle(50f) .onClick { @@ -211,7 +211,7 @@ class PlayerPickerTable( } if (!locked) { - playerTable.add("-".toLabel(Color.BLACK, 30, Align.center) + playerTable.add("-".toLabel(ImageGetter.CHARCOAL, 30, Align.center) .surroundWithCircle(40f) .onClick { gameParameters.players.remove(player) diff --git a/core/src/com/unciv/ui/screens/overviewscreen/CityOverviewTabColumn.kt b/core/src/com/unciv/ui/screens/overviewscreen/CityOverviewTabColumn.kt index cea6d6f9c0..d6e7d9a85c 100644 --- a/core/src/com/unciv/ui/screens/overviewscreen/CityOverviewTabColumn.kt +++ b/core/src/com/unciv/ui/screens/overviewscreen/CityOverviewTabColumn.kt @@ -38,7 +38,7 @@ enum class CityOverviewTabColumn : ISortableGridContentProvider(collator) { it.name.tr(hideIcons = true) } override fun getHeaderActor(iconSize: Float) = - ImageGetter.getImage("UnitIcons/Settler").apply { color = Color.BLACK } + ImageGetter.getImage("UnitIcons/Settler").apply { color = ImageGetter.CHARCOAL } .surroundWithCircle(iconSize) override fun getEntryValue(item: City) = 0 // make sure that `stat!!` in the super isn't used override fun getEntryActor(item: City, iconSize: Float, actionContext: EmpireOverviewScreen) = diff --git a/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt b/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt index 59b878c657..f8f1a1d46d 100644 --- a/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt +++ b/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt @@ -61,7 +61,7 @@ class GlobalPoliticsOverviewTable( defaults().pad(5f) background = BaseScreen.skinStrings.getUiBackground( "OverviewScreen/DiplomacyOverviewTab/CivTable", - tintColor = Color.BLACK + tintColor = ImageGetter.CHARCOAL ) } @@ -532,7 +532,7 @@ class GlobalPoliticsOverviewTable( legend.add(ShadowedLabel("Diagram line colors", Constants.headingFontSize)).colspan(2).row() //todo Rethink hardcoding together with the statusLine.color one in DiplomacyGroup legend.addLegendRow("War", Color.RED) - for (level in RelationshipLevel.values()) { + for (level in RelationshipLevel.entries) { val lineColor = if (level == RelationshipLevel.Ally) Color.CYAN else level.color legend.addLegendRow(level.name, lineColor) } diff --git a/core/src/com/unciv/ui/screens/overviewscreen/NotificationsOverviewTable.kt b/core/src/com/unciv/ui/screens/overviewscreen/NotificationsOverviewTable.kt index 1f971caf8b..f0f4651c81 100644 --- a/core/src/com/unciv/ui/screens/overviewscreen/NotificationsOverviewTable.kt +++ b/core/src/com/unciv/ui/screens/overviewscreen/NotificationsOverviewTable.kt @@ -1,16 +1,15 @@ package com.unciv.ui.screens.overviewscreen -import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.ui.Table import com.unciv.logic.civilization.Civilization import com.unciv.logic.civilization.Notification import com.unciv.logic.civilization.NotificationCategory import com.unciv.models.translations.tr +import com.unciv.ui.components.extensions.toLabel +import com.unciv.ui.components.input.onClick import com.unciv.ui.components.widgets.ColorMarkupLabel import com.unciv.ui.components.widgets.TabbedPager -import com.unciv.ui.components.input.onClick -import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.images.ImageGetter import com.unciv.ui.screens.basescreen.BaseScreen @@ -76,7 +75,7 @@ class NotificationsOverviewTable( add(ImageGetter.getWhiteDot()).minHeight(2f).width(stageWidth / 4) }).row() - for (category in NotificationCategory.values()) { + for (category in Notification.NotificationCategory.entries) { val categoryNotifications = notifications.filter { it.category == category } if (categoryNotifications.isEmpty()) continue @@ -86,7 +85,7 @@ class NotificationsOverviewTable( for (notification in categoryNotifications) { val notificationTable = Table(BaseScreen.skin) - val label = ColorMarkupLabel(notification.text, Color.BLACK, fontSize = 20) + val label = ColorMarkupLabel(notification.text, ImageGetter.CHARCOAL, fontSize = 20) .apply { wrap = true } notificationTable.add(label).width(stageWidth / 2 - iconSize * notification.icons.size) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PromotionScreenColors.kt b/core/src/com/unciv/ui/screens/pickerscreens/PromotionScreenColors.kt index 27b3ec0c17..3ac4659b48 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PromotionScreenColors.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PromotionScreenColors.kt @@ -1,6 +1,7 @@ package com.unciv.ui.screens.pickerscreens import com.badlogic.gdx.graphics.Color +import com.unciv.ui.images.ImageGetter /** Colours used on the [PromotionPickerScreen] @@ -8,7 +9,7 @@ import com.badlogic.gdx.graphics.Color * These are backed by Skin.json */ class PromotionScreenColors { - val default: Color = Color.BLACK + val default: Color = ImageGetter.CHARCOAL val selected: Color = Color(0.2824f, 0.5765f, 0.6863f, 1f) // colorFromRGB(72, 147, 175) val pathToSelection: Color = Color(0.1882f, 0.3843f, 0.4575f, 1f) // selected.darken(0.33f) val promoted: Color = Color(0.8f, 0.6745f, 0f, 1f) // colorFromRGB(255, 215, 0).darken(0.2f) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt index 2049c711aa..ea562461a9 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt @@ -99,7 +99,7 @@ class ReligiousBeliefsPickerScreen ( } val changeReligionNameButton = Button( - ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = Color.BLACK }.surroundWithCircle(30f), + ImageGetter.getImage("OtherIcons/Pencil").apply { this.color = ImageGetter.CHARCOAL }.surroundWithCircle(30f), skin ) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/TechButton.kt b/core/src/com/unciv/ui/screens/pickerscreens/TechButton.kt index aea26fd950..6b2b3ea426 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/TechButton.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/TechButton.kt @@ -95,7 +95,7 @@ class TechButton( techEnabledIcons.background = BaseScreen.skinStrings.getUiBackground( "TechPickerScreen/TechButtonIconsOutline", BaseScreen.skinStrings.roundedEdgeRectangleSmallShape, - tintColor = Color.BLACK.cpy().apply { a = 0.7f } + tintColor = ImageGetter.CHARCOAL.cpy().apply { a = 0.7f } ) techEnabledIcons.pad(2f, 10f, 2f, 0f) techEnabledIcons.defaults().padRight(5f) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt index 583deaacb8..cd9299a041 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt @@ -152,7 +152,7 @@ class TechPickerScreen( val color = when { civTech.era.name == era -> queuedTechColor ruleset.eras[era]!!.eraNumber < civTech.era.eraNumber -> colorFromRGB(255, 175, 0) - else -> Color.BLACK.cpy() + else -> ImageGetter.CHARCOAL.cpy() } val table1 = Table().pad(1f) @@ -213,7 +213,7 @@ class TechPickerScreen( tempTechsToResearch.firstOrNull() == techName && !freeTechPick -> currentTechColor researchableTechs.contains(techName) -> researchableTechColor tempTechsToResearch.contains(techName) -> queuedTechColor - else -> Color.BLACK.cpy() + else -> ImageGetter.CHARCOAL.cpy() }) if (isResearched && techName != Constants.futureTech) { diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt index 39e7f9f4ad..e19e40e48f 100644 --- a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt @@ -81,7 +81,7 @@ internal class VictoryScreenCivGroup( civ.isDefeated() && defeatedPlayerStyle == DefeatedPlayerStyle.GREYED_OUT -> { val icon = (ImageGetter.getImage("OtherIcons/DisbandUnit")) icon.setSize(30f) - return Triple(icon, Color.LIGHT_GRAY, Color.BLACK) + return Triple(icon, Color.LIGHT_GRAY, ImageGetter.CHARCOAL) } currentPlayer.isSpectator() || civ.isDefeated() && defeatedPlayerStyle == DefeatedPlayerStyle.REGULAR @@ -92,7 +92,7 @@ internal class VictoryScreenCivGroup( return Triple(ImageGetter.getNationPortrait(civ.nation, 30f), civ.nation.getOuterColor(), civ.nation.getInnerColor()) } else -> - return Triple((ImageGetter.getRandomNationPortrait(30f)), Color.LIGHT_GRAY, Color.BLACK) + return Triple((ImageGetter.getRandomNationPortrait(30f)), Color.LIGHT_GRAY, ImageGetter.CHARCOAL) } } diff --git a/core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt b/core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt index 6fc8013b03..906f46bd7d 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt @@ -301,7 +301,7 @@ class NotificationsScroll( .minHeight(2f).width(minCategoryLineWidth) add(Table().apply { background = backgroundDrawable - val label = ColorMarkupLabel(category.name, Color.BLACK, fontSize = fontSize) + val label = ColorMarkupLabel(category.name, ImageGetter.CHARCOAL, fontSize = fontSize) add(label) captionWidth = prefWidth // of this wrapper including background rims captionWidth @@ -348,7 +348,7 @@ class NotificationsScroll( } val maxLabelWidth = maxEntryWidth - (itemIconSize + 5f) * notification.icons.size - 10f - val label = WrappableLabel(notification.text, maxLabelWidth, Color.BLACK, labelFontSize, hideIcons = true) + val label = WrappableLabel(notification.text, maxLabelWidth, ImageGetter.CHARCOAL, labelFontSize, hideIcons = true) label.setAlignment(Align.center) if (label.prefWidth > maxLabelWidth * scaleFactor) { // can't explain why the comparison needs scaleFactor label.wrap = true @@ -413,11 +413,11 @@ class NotificationsScroll( .surroundWithCircle(restoreButtonSize, resizeActor = false) size(restoreButtonSize) - countLabel = "".toLabel(Color.BLACK, restoreButtonNumberFontSize, Align.center) + countLabel = "".toLabel(ImageGetter.CHARCOAL, restoreButtonNumberFontSize, Align.center) // not using surroundWithCircle for the count, as the centering will break if positioned within another IconCircleGroup (why?) labelInnerCircle = ImageGetter.getCircle(Color.WHITE, restoreButtonNumbersSize * 0.9f) labelInnerCircle.centerAtNumberPosition() - labelOuterCircle = ImageGetter.getCircle(Color.BLACK, restoreButtonNumbersSize) + labelOuterCircle = ImageGetter.getCircle(ImageGetter.CHARCOAL, restoreButtonNumbersSize) labelOuterCircle.centerAtNumberPosition() actor.addActor(labelOuterCircle) actor.addActor(labelInnerCircle) diff --git a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt index d6791db7a4..67711ab02b 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt @@ -237,7 +237,7 @@ object BattleTableHelpers { val damagedHealth = ImageGetter.getDot(Color.FIREBRICK) if (UncivGame.Current.settings.continuousRendering) { damagedHealth.addAction(Actions.forever(Actions.sequence( - Actions.color(Color.BLACK, 0.7f), + Actions.color(ImageGetter.CHARCOAL, 0.7f), Actions.color(Color.FIREBRICK, 0.7f) ))) } @@ -247,7 +247,7 @@ object BattleTableHelpers { val remainingHealthDot = ImageGetter.getWhiteDot() remainingHealthDot.color = Color.GREEN - addHealthToBar(ImageGetter.getDot(Color.BLACK), maxHealth - currentHealth) + addHealthToBar(ImageGetter.getDot(ImageGetter.CHARCOAL), maxHealth - currentHealth) addHealthToBar(damagedHealth, currentHealth - maxRemainingHealth) addHealthToBar(maybeDamagedHealth, maxRemainingHealth - minRemainingHealth) addHealthToBar(remainingHealthDot, minRemainingHealth) diff --git a/core/src/com/unciv/ui/screens/worldscreen/minimap/MapOverlayToggleButton.kt b/core/src/com/unciv/ui/screens/worldscreen/minimap/MapOverlayToggleButton.kt index 0ef3dfb033..bd16b47230 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/minimap/MapOverlayToggleButton.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/minimap/MapOverlayToggleButton.kt @@ -1,6 +1,5 @@ package com.unciv.ui.screens.worldscreen.minimap -import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Image import com.unciv.GUI import com.unciv.ui.components.extensions.setSize @@ -30,7 +29,7 @@ class MapOverlayToggleButton( resizeActor = false ) { init { - circle.color = Color.BLACK + circle.color = ImageGetter.CHARCOAL onClick(::toggle) } diff --git a/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnAction.kt b/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnAction.kt index ee30f37f57..3858681eab 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnAction.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnAction.kt @@ -8,6 +8,7 @@ import com.unciv.models.Counter import com.unciv.models.ruleset.BeliefType import com.unciv.ui.components.extensions.disable import com.unciv.ui.components.extensions.enable +import com.unciv.ui.images.ImageGetter import com.unciv.ui.popups.ConfirmPopup import com.unciv.ui.screens.cityscreen.CityScreen import com.unciv.ui.screens.overviewscreen.EspionageOverviewScreen @@ -21,7 +22,7 @@ import com.unciv.utils.Concurrency import com.unciv.utils.launchOnGLThread enum class NextTurnAction(protected val text: String, val color: Color) { - Default("", Color.BLACK) { + Default("", ImageGetter.CHARCOAL) { override val icon get() = null override fun isChoice(worldScreen: WorldScreen) = false }, diff --git a/core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt b/core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt index aa9b074792..3825a3beea 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt @@ -253,7 +253,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table() { 1 -> Color.BROWN 2 -> Color.LIGHT_GRAY 3 -> Color.GOLD - else -> Color.BLACK + else -> ImageGetter.CHARCOAL } repeat(spy.rank) { val star = ImageGetter.getImage("OtherIcons/Star") @@ -280,7 +280,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table() { for (status in selectedUnit!!.statuses) { val group = ImageGetter.getPromotionPortrait(status.name) - val turnsLeft = "${status.turnsLeft}${Fonts.turn}".toLabel(fontSize = 8).surroundWithCircle(15f, color = Color.BLACK) + val turnsLeft = "${status.turnsLeft}${Fonts.turn}".toLabel(fontSize = 8).surroundWithCircle(15f, color = ImageGetter.CHARCOAL) group.addActor(turnsLeft) turnsLeft.setPosition(group.width, 0f, Align.bottomRight) promotionsTable.add(group).padBottom(2f) diff --git a/core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt b/core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt index 043ef6686e..9b8b8904fa 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt @@ -42,10 +42,10 @@ class MoveHereOverlayButtonData(val unitToTurnsToDestination: HashMap