mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 23:37:31 +07:00
Change map resource controls presentation (#9104)
This commit is contained in:
parent
bc341a6fcb
commit
4c88fbb996
@ -379,6 +379,7 @@ Sparse =
|
||||
Abundant =
|
||||
Strategic Balance =
|
||||
Legendary Start =
|
||||
This is used for painting resources, not in map generator steps: =
|
||||
|
||||
Advanced Settings =
|
||||
RNG Seed =
|
||||
|
@ -5,6 +5,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.CheckBox
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldFilter.DigitsOnlyFilter
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.logic.map.MapGeneratedMainType
|
||||
import com.unciv.logic.map.MapParameters
|
||||
import com.unciv.logic.map.MapResources
|
||||
@ -274,6 +275,10 @@ class MapParametersTable(
|
||||
mapParameters.mapResources = resourceSelectBox.selected.value
|
||||
}
|
||||
|
||||
if (forMapEditor) {
|
||||
val comment = "This is used for painting resources, not in map generator steps:"
|
||||
add(comment.toLabel(Color.GOLD, 14, Align.center).apply { wrap=true }).colspan(2).row()
|
||||
}
|
||||
add("{Resource Setting}:".toLabel()).left()
|
||||
add(resourceSelectBox).fillX().row()
|
||||
}
|
||||
@ -362,7 +367,7 @@ class MapParametersTable(
|
||||
return slider
|
||||
}
|
||||
|
||||
fun addTextButton(text: String, shouldAddToTable: Boolean = false, action: ((Boolean) -> Unit),) {
|
||||
fun addTextButton(text: String, shouldAddToTable: Boolean = false, action: ((Boolean) -> Unit)) {
|
||||
val button = text.toTextButton()
|
||||
button.onClick { action.invoke(true) }
|
||||
if (shouldAddToTable)
|
||||
@ -378,8 +383,10 @@ class MapParametersTable(
|
||||
addSlider("Temperature shift", {mapParameters.temperatureShift}, -0.4f, 0.4f, 0.1f)
|
||||
{ mapParameters.temperatureShift = it }
|
||||
|
||||
addSlider("Resource richness", {mapParameters.resourceRichness},0f, 0.5f)
|
||||
{ mapParameters.resourceRichness = it }
|
||||
if (forMapEditor) {
|
||||
addSlider("Resource richness", { mapParameters.resourceRichness }, 0f, 0.5f)
|
||||
{ mapParameters.resourceRichness = it }
|
||||
}
|
||||
|
||||
addSlider("Vegetation richness", {mapParameters.vegetationRichness}, 0f, 1f)
|
||||
{ mapParameters.vegetationRichness = it }
|
||||
|
Loading…
Reference in New Issue
Block a user