mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 03:18:18 +07:00
Add tileScale
in TileSetConfig
. (#5874)
* Add `tileScale` in `TileSetConfig`. * Right, KDoc.
This commit is contained in:
parent
483dd2e871
commit
96beed4b3e
@ -8,6 +8,8 @@ class TileSetConfig {
|
||||
var fogOfWarColor: Color = Color.BLACK
|
||||
/** Name of the tileset to use when this one is missing images. Null to disable. */
|
||||
var fallbackTileSet: String? = "FantasyHex"
|
||||
/** Scale factor for hex images, with hex center as origin. */
|
||||
var tileScale: Float = 1f
|
||||
var ruleVariants: HashMap<String, Array<String>> = HashMap()
|
||||
|
||||
fun updateConfig(other: TileSetConfig){
|
||||
|
@ -246,11 +246,11 @@ open class TileGroup(var tileInfo: TileInfo, val tileSetStrings:TileSetStrings,
|
||||
/** Used for: Underlying tile, unit overlays, border images, perhaps for other things in the future.
|
||||
Parent should already be set when calling. */
|
||||
private fun setHexagonImageSize(hexagonImage: Image) {
|
||||
// Using "scale" can get really confusing when positioning, how about no
|
||||
hexagonImage.setSize(hexagonImageWidth, hexagonImage.height * hexagonImageWidth / hexagonImage.width)
|
||||
hexagonImage.setOrigin(hexagonImageOrigin.first, hexagonImageOrigin.second)
|
||||
hexagonImage.x = hexagonImagePosition.first
|
||||
hexagonImage.y = hexagonImagePosition.second
|
||||
hexagonImage.setScale(tileSetStrings.tileSetConfig.tileScale)
|
||||
}
|
||||
|
||||
private fun updateTileImage(viewingCiv: CivilizationInfo?) {
|
||||
|
Loading…
Reference in New Issue
Block a user