diff --git a/android/build.gradle b/android/build.gradle index b9d42580cd..91fff997dc 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 29 - versionName "1.3.2" + versionCode 30 + versionName "1.3.3" } buildTypes { release { diff --git a/core/src/com/unciv/ui/tilegroups/TileGroup.kt b/core/src/com/unciv/ui/tilegroups/TileGroup.kt index abbf4efa27..af8c071f01 100644 --- a/core/src/com/unciv/ui/tilegroups/TileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/TileGroup.kt @@ -29,7 +29,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() { val groupSize = 50f this.setSize(groupSize,groupSize) hexagon = ImageGetter.getImage("TerrainIcons/Hexagon.png") - val imageScale = groupSize * 1.3f / hexagon.width + val imageScale = groupSize * 1.5f / hexagon.width hexagon.setScale(imageScale) hexagon.setOrigin(Align.center) hexagon.setPosition((width - hexagon.width) / 2, @@ -43,7 +43,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() { populationImage!!.run { setSize(20f, 20f) setPosition(this@TileGroup.width/2 - width/2, - this@TileGroup.height/2 - height/2 - 15) + this@TileGroup.height/2 - height/2 - 20) } // top left addActor(populationImage) } @@ -94,7 +94,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() { addActor(unitImage!!) unitImage!!.setSize(20f, 20f) unitImage!!.setPosition(width/2 - unitImage!!.width/2, - height/2 - unitImage!!.height/2 +15) // top + height/2 - unitImage!!.height/2 +20) // top } if (tileInfo.unit == null && unitImage != null) { diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index d223a81da3..014498c106 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -13,6 +13,7 @@ import com.unciv.ui.pickerscreens.TechPickerScreen import com.unciv.ui.utils.CameraStageBaseScreen import com.unciv.ui.utils.disable import com.unciv.ui.utils.enable +import com.unciv.ui.worldscreen.WorldScreen import java.util.* class UnitActions { @@ -24,10 +25,9 @@ class UnitActions { } } - fun getUnitActions(tile: TileInfo): List { + fun getUnitActions(tile: TileInfo, worldScreen: WorldScreen): List { val unit = tile.unit!! - val worldScreen = UnCivGame.Current.worldScreen!! val tileMapHolder = worldScreen.tileMapHolder val unitTable = worldScreen.unitTable diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt index 132cd136ff..9cf6b7b277 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt @@ -27,7 +27,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){ val tileTableBackground = ImageGetter.getDrawable("skin/tileTableBackground.png") .tint(Color(0x004085bf)) pad(20f) - setBackground(tileTableBackground) + background = tileTableBackground add(unitLabel) add(unitActionsTable) row() @@ -41,7 +41,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){ if(selectedUnitTile!=null) { unitLabel.setText(getSelectedUnit().name+" "+getSelectedUnit().movementString) - for (button in UnitActions().getUnitActions(selectedUnitTile!!)) + for (button in UnitActions().getUnitActions(selectedUnitTile!!,worldScreen)) unitActionsTable.add(button).colspan(2).pad(5f) .size(button.width * worldScreen.buttonScale, button.height * worldScreen.buttonScale).row() }