mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 23:14:25 +07:00
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
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:
parent
cf4fd63959
commit
648e50d2ad
@ -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
|
||||
@ -83,6 +86,12 @@ class WorldScreenMenuPopup(
|
||||
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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user