mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -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
|
||||
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
|
||||
val floatAction = object : FloatAction(0f, 1f, 0.4f) {
|
||||
override fun update(percent: Float) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user