mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-12 19:10:12 +07:00
Resolved #2549 - fixed New Game Screen options alignment and placing
This commit is contained in:
parent
9b93e4fb51
commit
d81507ef2d
@ -23,9 +23,12 @@ class NewGameOptionsTable(newGameScreen: NewGameScreen, val updatePlayerPickerTa
|
||||
defaults().pad(5f)
|
||||
|
||||
add("Game Options".toLabel(fontSize = 24)).padTop(0f).padBottom(20f).colspan(2).row()
|
||||
add(Table().apply {
|
||||
defaults().pad(5f)
|
||||
addDifficultySelectBox()
|
||||
addGameSpeedSelectBox()
|
||||
addEraSelectBox()
|
||||
}).colspan(2).row()
|
||||
addCityStatesSelectBox()
|
||||
addVictoryTypeCheckboxes()
|
||||
|
||||
@ -82,8 +85,8 @@ class NewGameOptionsTable(newGameScreen: NewGameScreen, val updatePlayerPickerTa
|
||||
}
|
||||
}
|
||||
|
||||
fun addSelectBox(text: String, values: Collection<String>, initialState: String, onChange: (newValue: String) -> Unit) {
|
||||
add(text.toLabel())
|
||||
fun Table.addSelectBox(text: String, values: Collection<String>, initialState: String, onChange: (newValue: String) -> Unit) {
|
||||
add(text.toLabel()).left()
|
||||
val selectBox = TranslatedSelectBox(values, initialState, CameraStageBaseScreen.skin)
|
||||
selectBox.onChange { onChange(selectBox.selected.value) }
|
||||
add(selectBox).fillX().row()
|
||||
|
Loading…
Reference in New Issue
Block a user