Added "exit" button in world screen popup menu
Some checks failed
Conflict marking / main (push) Failing after 7s
Detekt / detekt (ubuntu-latest) (push) Failing after 51s
Docker / build (push) Failing after 1m17s
Generate mkdocs from docs folder / deploy (push) Failing after 33s
Build and test / Check code and run unit tests (push) Failing after 5m25s

This commit is contained in:
yairm210 2024-12-10 23:18:08 +02:00
parent cf4fd63959
commit 648e50d2ad

View File

@ -1,10 +1,13 @@
package com.unciv.ui.screens.worldscreen.mainmenu
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.scenes.scene2d.Actor
import com.badlogic.gdx.scenes.scene2d.ui.Cell
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle
import com.unciv.ui.components.input.KeyboardBinding
import com.unciv.ui.components.input.onLongPress
import com.unciv.ui.popups.Popup
import com.unciv.ui.screens.basescreen.BaseScreen
import com.unciv.ui.screens.savescreens.LoadGameScreen
import com.unciv.ui.screens.victoryscreen.VictoryScreen
import com.unciv.ui.screens.worldscreen.WorldScreen
@ -82,6 +85,12 @@ class WorldScreenMenuPopup(
close()
worldScreen.openDeveloperConsole()
}.nextColumn()
addButton("Exit") {
close()
Gdx.app.exit()
}.apply { actor.style = BaseScreen.skin.get("negative", TextButtonStyle::class.java) }
.nextColumn()
addCloseButton().run { colspan(if (singleColumn || column == 1) 1 else 2) }
pack()