mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Resolved #12349 - Added version to main menu
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.unciv.ui.screens.mainmenuscreen
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||
import com.badlogic.gdx.scenes.scene2d.actions.Actions
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Stack
|
||||
@ -210,6 +211,17 @@ class MainMenuScreen: BaseScreen(), RecreateOnResize {
|
||||
helpButton.addTooltip(KeyboardBinding.Civilopedia, 30f)
|
||||
helpButton.setPosition(30f, 30f)
|
||||
stage.addActor(helpButton)
|
||||
|
||||
|
||||
val versionLabel = "{Version} ${UncivGame.VERSION.text}".toLabel()
|
||||
versionLabel.setAlignment(Align.center)
|
||||
val versionTable = Table()
|
||||
versionTable.background = skinStrings.getUiBackground("MainMenuScreen/Version",
|
||||
skinStrings.roundedEdgeRectangleShape, Color.DARK_GRAY.cpy().apply { a=0.7f })
|
||||
versionTable.add(versionLabel)
|
||||
versionTable.pack()
|
||||
versionTable.setPosition(stage.width/2, 10f, Align.bottom)
|
||||
stage.addActor(versionTable)
|
||||
}
|
||||
|
||||
private fun startBackgroundMapGeneration() {
|
||||
|
@ -72,6 +72,7 @@ These shapes are used all over Unciv and can be replaced to make a lot of UI ele
|
||||
| LoadGameScreen/ | TopTable | null | |
|
||||
| MainMenuScreen/ | Background | null | |
|
||||
| MainMenuScreen/ | MenuButton | roundedEdgeRectangle | |
|
||||
| MainMenuScreen/ | Version | roundedEdgeRectangle | |
|
||||
| MapEditor/MapEditorToolsDrawer/ | Handle | null | |
|
||||
| ModManagementOptions/ | ExpanderTab | null | |
|
||||
| ModManagementScreen/ | BottomTable | null | |
|
||||
|
Reference in New Issue
Block a user