mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 15:59:33 +07:00
Wrappable multiplayer button (#9002)
This commit is contained in:
@ -634,7 +634,14 @@ class WorldScreen(
|
|||||||
|
|
||||||
updateMultiplayerStatusButton()
|
updateMultiplayerStatusButton()
|
||||||
|
|
||||||
|
statusButtons.wrap(false)
|
||||||
statusButtons.pack()
|
statusButtons.pack()
|
||||||
|
val maxWidth = stage.width - techPolicyAndDiplomacy.width - 25f
|
||||||
|
if(statusButtons.width > maxWidth) {
|
||||||
|
statusButtons.width = maxWidth
|
||||||
|
statusButtons.wrap()
|
||||||
|
statusButtons.pack()
|
||||||
|
}
|
||||||
statusButtons.setPosition(stage.width - statusButtons.width - 10f, topBar.y - statusButtons.height - 10f)
|
statusButtons.setPosition(stage.width - statusButtons.width - 10f, topBar.y - statusButtons.height - 10f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@ class StatusButtons(
|
|||||||
init {
|
init {
|
||||||
space(10f)
|
space(10f)
|
||||||
right()
|
right()
|
||||||
|
wrapReverse()
|
||||||
|
wrapSpace(10f)
|
||||||
|
rowRight()
|
||||||
if (multiplayerStatusButton != null) {
|
if (multiplayerStatusButton != null) {
|
||||||
addActor(multiplayerStatusButton)
|
addActor(multiplayerStatusButton)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user