mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:04:47 +07:00
More unit table improvements - see #12591
This commit is contained in:
parent
6c4965aaee
commit
dcaf9c421a
@ -510,7 +510,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
|
||||
}
|
||||
}
|
||||
|
||||
private class GameStartScreen : BaseScreen() {
|
||||
class GameStartScreen : BaseScreen() {
|
||||
init {
|
||||
val logoImage = ImageGetter.getExternalImage("banner.png")
|
||||
logoImage.center(stage)
|
||||
|
@ -15,6 +15,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.Drawable
|
||||
import com.badlogic.gdx.utils.viewport.ExtendViewport
|
||||
import com.unciv.GameStartScreen
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.TutorialTrigger
|
||||
import com.unciv.models.metadata.BaseRuleset
|
||||
@ -60,7 +61,7 @@ abstract class BaseScreen : Screen {
|
||||
/** The ExtendViewport sets the _minimum_(!) world size - the actual world size will be larger, fitted to screen/window aspect ratio. */
|
||||
stage = UncivStage(ExtendViewport(height, height))
|
||||
|
||||
if (enableSceneDebug && this !is CrashScreen) {
|
||||
if (enableSceneDebug && this !is CrashScreen && this !is GameStartScreen) {
|
||||
stage.setDebugUnderMouse(true)
|
||||
stage.setDebugTableUnderMouse(true)
|
||||
stage.setDebugParentUnderMouse(true)
|
||||
|
@ -29,9 +29,9 @@ class UnitTable(val worldScreen: WorldScreen) : Table() {
|
||||
private val prevIdleUnitButton = IdleUnitButton(this,worldScreen.mapHolder,true)
|
||||
private val nextIdleUnitButton = IdleUnitButton(this,worldScreen.mapHolder,false)
|
||||
private val unitIconHolder = Table()
|
||||
private val unitNameLabel = "".toLabel()
|
||||
private val unitNameLabel = "".toLabel(fontSize = 24)
|
||||
private val unitIconNameGroup = Table()
|
||||
private val promotionsTable = Table()
|
||||
private val promotionsTable = Table().apply { defaults().padRight(5f) }
|
||||
private val unitDescriptionTable = Table(BaseScreen.skin)
|
||||
|
||||
val selectedUnit : MapUnit?
|
||||
@ -103,7 +103,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table() {
|
||||
val moveBetweenUnitsTable = Table().apply {
|
||||
add(prevIdleUnitButton)
|
||||
unitIconNameGroup.add(unitIconHolder)
|
||||
unitIconNameGroup.add(unitNameLabel).pad(5f)
|
||||
unitIconNameGroup.add(unitNameLabel).apply { Fonts.font.descent }
|
||||
unitIconHolder.touchable = Touchable.enabled
|
||||
unitNameLabel.touchable = Touchable.enabled
|
||||
add(unitIconNameGroup)
|
||||
@ -276,7 +276,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table() {
|
||||
unitIconHolder.add(UnitIconGroup(selectedUnit!!, 30f)).pad(5f)
|
||||
|
||||
for (promotion in selectedUnit!!.promotions.getPromotions(true))
|
||||
promotionsTable.add(ImageGetter.getPromotionPortrait(promotion.name)).padBottom(2f)
|
||||
promotionsTable.add(ImageGetter.getPromotionPortrait(promotion.name, 20f)).padBottom(2f)
|
||||
|
||||
for (status in selectedUnit!!.statuses) {
|
||||
val group = ImageGetter.getPromotionPortrait(status.name)
|
||||
|
Loading…
Reference in New Issue
Block a user