mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 05:09:25 +07:00
UnitTable close button clickHandler fix (#8573)
This commit is contained in:
@ -82,15 +82,16 @@ class UnitTable(val worldScreen: WorldScreen) : Table() {
|
|||||||
|
|
||||||
add(VerticalGroup().apply {
|
add(VerticalGroup().apply {
|
||||||
pad(5f)
|
pad(5f)
|
||||||
|
touchable = Touchable.enabled
|
||||||
deselectUnitButton.add(ImageGetter.getImage("OtherIcons/Close")).size(20f).pad(10f)
|
onClick {
|
||||||
deselectUnitButton.pack()
|
|
||||||
deselectUnitButton.touchable = Touchable.enabled
|
|
||||||
deselectUnitButton.onClick {
|
|
||||||
selectUnit()
|
selectUnit()
|
||||||
worldScreen.shouldUpdate = true
|
worldScreen.shouldUpdate = true
|
||||||
this@UnitTable.isVisible = false
|
this@UnitTable.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deselectUnitButton.add(ImageGetter.getImage("OtherIcons/Close")).size(20f).pad(10f)
|
||||||
|
deselectUnitButton.pack()
|
||||||
|
deselectUnitButton.touchable = Touchable.enabled
|
||||||
addActor(deselectUnitButton)
|
addActor(deselectUnitButton)
|
||||||
}).left()
|
}).left()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user