Verified Commit 9fe4a169 authored by Jørgen Syvertsen's avatar Jørgen Syvertsen
Browse files

Fix bug in Modal leading to weird alignment in HeroDetails

parent b3a3b54a
......@@ -50,14 +50,17 @@ class Modal(
}
private fun <T : Actor> addActors(actors: List<T>) {
dialog.contentTable.row()
actors.forEach { dialog.contentTable.add(it) }
}
init {
dialog.setScale(scale)
val dialogText = Label(text, skin)
dialogText.wrap = true
dialog.contentTable.add(dialogText).center().width(dialog.prefWidth * 0.9f)
if (text != null) {
val dialogText = Label(text, skin)
dialogText.wrap = true
dialog.contentTable.add(dialogText).center().width(dialog.prefWidth * 0.9f)
}
addActors(contentActors)
dialog.isMovable = false
when (type) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment