Empire Overview Religion: Fixed header, selection more visible (#6369)

This commit is contained in:
SomeTroglodyte
2022-03-21 20:06:19 +01:00
committed by GitHub
parent 367a427436
commit 7734a48237

View File

@ -1,8 +1,10 @@
package com.unciv.ui.overviewscreen
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.Button
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
import com.badlogic.gdx.utils.Align
import com.unciv.Constants
import com.unciv.UncivGame
@ -35,19 +37,27 @@ class ReligionOverviewTab(
private val statsTable = Table()
private val beliefsTable = Table()
init {
override fun getFixedContent(): WidgetGroup? {
return Table().apply {
defaults().pad(5f)
align(Align.top)
loadReligionButtons()
civStatsTable.defaults().left().pad(5f)
statsTable.defaults().left().pad(5f)
beliefsTable.defaults().padBottom(20f)
civStatsTable.addCivSpecificStats()
add(civStatsTable).row()
add(religionButtons).row()
add(religionButtonLabel)
addSeparator()
}
}
init {
defaults().pad(5f)
align(Align.top)
loadReligionButtons()
statsTable.defaults().left().pad(5f)
beliefsTable.defaults().padBottom(20f)
loadReligion(persistableData.selectedReligion)
add(statsTable).row()
add(beliefsTable).pad(20f)
@ -110,6 +120,8 @@ class ReligionOverviewTab(
statsTable.clear()
beliefsTable.clear()
religionButtonLabel.setText(religion.getReligionDisplayName().tr())
religionButtonLabel.setFontSize(Constants.headingFontSize)
religionButtonLabel.color = Color.CORAL
for (belief in religion.getAllBeliefsOrdered()) {
beliefsTable.add(createBeliefDescription(belief)).row()