Fix "Translating" wiki link (#11545)

* Fix external wiki link for Translation

* Mini lint - use brighten where functionally equivalent

* Mini lint - condition indent made it unreadable - loop only once
This commit is contained in:
SomeTroglodyte
2024-05-14 09:57:36 +02:00
committed by GitHub
parent a8c0bef379
commit 5b002acfee
3 changed files with 5 additions and 3 deletions

View File

@ -14,6 +14,7 @@ import com.unciv.ui.components.MapArrowType
import com.unciv.ui.components.MiscArrowTypes
import com.unciv.ui.components.TintedMapArrow
import com.unciv.ui.components.UnitMovementMemoryType
import com.unciv.ui.components.extensions.brighten
import com.unciv.ui.components.extensions.center
import com.unciv.ui.components.extensions.centerX
import com.unciv.ui.components.extensions.toLabel
@ -333,7 +334,7 @@ class TileLayerMisc(tileGroup: TileGroup, size: Float) : TileLayer(tileGroup, si
/** Activates a colored semitransparent overlay. [color] is cloned, brightened by 0.3f and an alpha of 0.4f applied. */
fun overlayTerrain(color: Color) {
terrainOverlay.color = color.cpy().lerp(Color.WHITE, 0.3f).apply { a = 0.4f }
terrainOverlay.color = color.brighten(0.3f).apply { a = 0.4f }
terrainOverlay.isVisible = true
determineVisibility()
}

View File

@ -59,7 +59,7 @@ internal class LanguageTable(val language: String, val percentComplete: Int) : T
text = "Please note that translations are a community-based work in progress and are" +
" INCOMPLETE! The percentage shown is how much of the language is translated in-game." +
" If you want to help translating the game into your language, click here.",
link = "${Constants.wikiURL}Translating/",
link = "${Constants.wikiURL}Other/Translating/",
size = 15
)
add(MarkupRenderer.render(listOf(translationDisclaimer),expectedWidth)).pad(5f).row()

View File

@ -9,6 +9,7 @@ import com.unciv.logic.map.mapunit.MapUnit
import com.unciv.models.UnitAction
import com.unciv.models.UnitActionType
import com.unciv.models.UpgradeUnitAction
import com.unciv.ui.components.extensions.brighten
import com.unciv.ui.components.extensions.disable
import com.unciv.ui.components.input.keyShortcuts
import com.unciv.ui.components.input.onActivation
@ -155,7 +156,7 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table() {
val actionButton = IconTextButton(unitAction.title, icon, fontColor = fontColor)
if (unitAction.type == UnitActionType.Promote && unitAction.action != null)
actionButton.color = Color.GREEN.cpy().lerp(Color.WHITE, 0.5f)
actionButton.color = Color.GREEN.brighten(0.5f)
actionButton.pack()