mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 02:42:16 -04:00
Moved CityButton from TileGroup to WorldTileGroup
This commit is contained in:
parent
3959706ab9
commit
a8051bc930
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 30
|
||||
versionName "1.3.3"
|
||||
versionCode 31
|
||||
versionName "1.3.4"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -3,7 +3,6 @@ package com.unciv.ui.tilegroups
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.scenes.scene2d.Group
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Image
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.logic.map.TileInfo
|
||||
@ -23,7 +22,6 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
private var roadImages = HashMap<String, Image>()
|
||||
private var borderImages = ArrayList<Image>()
|
||||
|
||||
public var cityButton: TextButton? = null
|
||||
|
||||
init {
|
||||
val groupSize = 50f
|
||||
@ -69,7 +67,6 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
setPosition(this@TileGroup.width /2-width/2,
|
||||
this@TileGroup.height/2-height/2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(terrainFeatureImage!=null && tileInfo.terrainFeature==null){
|
||||
@ -77,6 +74,16 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
terrainFeatureImage=null
|
||||
}
|
||||
|
||||
if(cityImage==null && tileInfo.isCityCenter){
|
||||
terrainFeatureImage = ImageGetter.getImage("TerrainIcons/City.png")
|
||||
addActor(terrainFeatureImage)
|
||||
setSize(30f,30f)
|
||||
setColor(1f,1f,1f,0.5f)
|
||||
setPosition(this@TileGroup.width /2-width/2,
|
||||
this@TileGroup.height/2-height/2)
|
||||
}
|
||||
}
|
||||
|
||||
val RGB= tileInfo.getBaseTerrain().RGB!!
|
||||
hexagon.color = Color(RGB[0]/255f,RGB[1]/255f,RGB[2]/255f,1f)
|
||||
|
||||
|
@ -9,6 +9,7 @@ import com.unciv.ui.worldscreen.WorldScreen
|
||||
|
||||
|
||||
class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) {
|
||||
var cityButton: TextButton? = null
|
||||
|
||||
fun setIsViewable(isViewable: Boolean) {
|
||||
if (isViewable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user