mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
keep city button out of the way if a unit on the city tile is selected
This commit is contained in:
parent
e8a9157a65
commit
5e97d32898
@ -77,7 +77,11 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||||||
}
|
}
|
||||||
|
|
||||||
// when deselected, move city button to its original position
|
// when deselected, move city button to its original position
|
||||||
if (tileGroup.worldScreen.bottomBar.unitTable.selectedCity == null && isButtonMoved) {
|
val unitTable = tileGroup.worldScreen.bottomBar.unitTable
|
||||||
|
if (isButtonMoved
|
||||||
|
&& unitTable.selectedCity == null
|
||||||
|
&& unitTable.selectedUnit?.currentTile != city.ccenterTile) {
|
||||||
|
|
||||||
isButtonMoved = false
|
isButtonMoved = false
|
||||||
val floatAction = object : FloatAction(0f, 1f, 0.4f) {
|
val floatAction = object : FloatAction(0f, 1f, 0.4f) {
|
||||||
override fun update(percent: Float) {
|
override fun update(percent: Float) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user