Fixed misplaced back arrow

This commit is contained in:
Yair Morgenstern 2022-02-14 22:00:17 +02:00
parent 9d1f463310
commit 1e44b1a235

View File

@ -5,6 +5,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor
import com.badlogic.gdx.scenes.scene2d.ui.Button
import com.badlogic.gdx.scenes.scene2d.ui.Cell
import com.badlogic.gdx.scenes.scene2d.ui.Label
import com.badlogic.gdx.utils.Align
import com.unciv.Constants
/**
@ -22,10 +23,10 @@ class IconTextButton(text: String, val icon: Actor? = null, fontSize: Int = Cons
/** Table cell containing the [icon] if any, or `null`. */
val iconCell: Cell<Actor>? = if (icon != null) {
val size = fontSize.toFloat()
icon.setSize(size,size)
icon.setOrigin(Align.center)
add(icon).size(size).padRight(size / 3)
} else {
null
}
} else null
/** Table cell instance containing the [label]. */
val labelCell: Cell<Label> = add(label)
}