mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 13:18:56 +07:00
Popups get the ability to scroll only the content without the buttons (#9513)
* Popups get the ability to scroll only the content without the buttons * Centralize LoadingPopup * Split non-WorldScreenMenuPopup classes off from that file * Linting
This commit is contained in:
@ -47,7 +47,7 @@ open class FileChooser(
|
||||
title: String?,
|
||||
startFile: FileHandle? = null,
|
||||
private val resultListener: ResultListener? = null
|
||||
) : Popup(stageToShowOn, false) {
|
||||
) : Popup(stageToShowOn, Scrollability.None) {
|
||||
// config
|
||||
var filter = FileFilter { true }
|
||||
set(value) { field = value; resetList() }
|
||||
@ -123,21 +123,20 @@ open class FileChooser(
|
||||
|
||||
init {
|
||||
innerTable.top().left()
|
||||
innerTable.touchable = Touchable.enabled
|
||||
|
||||
fileList.selection.setProgrammaticChangeEvents(false)
|
||||
fileNameInput.setTextFieldListener { textField, _ -> result = textField.text }
|
||||
|
||||
if (title != null) {
|
||||
addGoodSizedLabel(title).colspan(2).center().row()
|
||||
innerTable.addSeparator(height = 1f)
|
||||
addSeparator(height = 1f)
|
||||
}
|
||||
add(pathLabelWrapper).colspan(2).fillX().row()
|
||||
innerTable.addSeparator(Color.GRAY, height = 1f)
|
||||
addSeparator(Color.GRAY, height = 1f)
|
||||
add(fileScroll).colspan(2).fill().row()
|
||||
innerTable.addSeparator(height = 1f)
|
||||
fileNameCell = innerTable.add().colspan(2).growX()
|
||||
innerTable.row()
|
||||
addSeparator(height = 1f)
|
||||
fileNameCell = add().colspan(2).growX()
|
||||
row()
|
||||
|
||||
addCloseButton("Cancel", KeyboardBinding.Cancel) {
|
||||
reportResult(false)
|
||||
|
Reference in New Issue
Block a user