diff --git a/core/src/com/unciv/logic/files/FileChooser.kt b/core/src/com/unciv/logic/files/FileChooser.kt index fea90d6cc6..530da090aa 100644 --- a/core/src/com/unciv/logic/files/FileChooser.kt +++ b/core/src/com/unciv/logic/files/FileChooser.kt @@ -123,6 +123,7 @@ open class FileChooser( init { innerTable.top().left() + innerTable.touchable = Touchable.enabled fileList.selection.setProgrammaticChangeEvents(false) fileNameInput.setTextFieldListener { textField, _ -> result = textField.text } diff --git a/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt b/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt index 680995ecd8..a01966513e 100644 --- a/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt +++ b/core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt @@ -428,9 +428,9 @@ fun Group.addBorderAllowOpacity(size:Float, color: Color): Group { /** get background Image for a new separator */ -private fun getSeparatorImage(color: Color) = ImageGetter.getDot( +private fun getSeparatorImage(color: Color) = Image(ImageGetter.getWhiteDotDrawable().tint( if (color.a != 0f) color else BaseScreen.skin.getColor("color") //0x334d80 -) +)) /** * Create a horizontal separator as an empty Container with a colored background. @@ -441,7 +441,7 @@ fun Table.addSeparator(color: Color = Color.WHITE, colSpan: Int = 0, height: Flo val separator = getSeparatorImage(color) val cell = add(separator) .colspan(if (colSpan == 0) columns else colSpan) - .minHeight(height).fillX() + .height(height).fillX() row() return cell } diff --git a/core/src/com/unciv/ui/images/ImageGetter.kt b/core/src/com/unciv/ui/images/ImageGetter.kt index 6808f058f8..cb79db7dc3 100644 --- a/core/src/com/unciv/ui/images/ImageGetter.kt +++ b/core/src/com/unciv/ui/images/ImageGetter.kt @@ -172,6 +172,7 @@ object ImageGetter { } fun getWhiteDot() = getImage(whiteDotLocation).apply { setSize(1f) } + fun getWhiteDotDrawable() = textureRegionDrawables[whiteDotLocation]!! fun getDot(dotColor: Color) = getWhiteDot().apply { color = dotColor } fun getExternalImage(fileName: String): Image {