mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Add a "Reset to defaults" button to the Newgame screen (#5141)
* Add a reset to defaults button to the new game screen * Add a reset to defaults button to the new game screen - template
This commit is contained in:
parent
d1135f3d20
commit
e0fe788e28
@ -249,6 +249,7 @@ Uniques =
|
||||
Promotions =
|
||||
Load copied data =
|
||||
Could not load game from clipboard! =
|
||||
Reset to defaults =
|
||||
Start game! =
|
||||
Map Options =
|
||||
Game Options =
|
||||
|
@ -44,6 +44,15 @@ class NewGameScreen(
|
||||
|
||||
updateRuleset()
|
||||
|
||||
if (UncivGame.Current.settings.lastGameSetup != null) {
|
||||
val resetToDefaultsButton = "Reset to defaults".toTextButton()
|
||||
resetToDefaultsButton.padBottom(5f)
|
||||
rightSideGroup.addActorAt(0, resetToDefaultsButton)
|
||||
resetToDefaultsButton.onClick {
|
||||
game.setScreen(NewGameScreen(previousScreen, GameSetupInfo()))
|
||||
}
|
||||
}
|
||||
|
||||
rightSideButton.enable()
|
||||
rightSideButton.setText("Start game!".tr())
|
||||
rightSideButton.onClick {
|
||||
|
@ -10,7 +10,7 @@ open class PickerScreen(disableScroll: Boolean = false) : CameraStageBaseScreen(
|
||||
|
||||
internal var closeButton: TextButton = Constants.close.toTextButton()
|
||||
protected var descriptionLabel: Label
|
||||
private var rightSideGroup = VerticalGroup()
|
||||
protected var rightSideGroup = VerticalGroup()
|
||||
protected var rightSideButton: TextButton
|
||||
private val screenSplit = 0.85f
|
||||
private val maxBottomTableHeight = 150f // about 7 lines of normal text
|
||||
|
Loading…
x
Reference in New Issue
Block a user