mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Empire Overview Religion: Fixed header, selection more visible (#6369)
This commit is contained in:
@ -1,8 +1,10 @@
|
|||||||
package com.unciv.ui.overviewscreen
|
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.Button
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
|
||||||
import com.badlogic.gdx.utils.Align
|
import com.badlogic.gdx.utils.Align
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
@ -35,19 +37,27 @@ class ReligionOverviewTab(
|
|||||||
private val statsTable = Table()
|
private val statsTable = Table()
|
||||||
private val beliefsTable = Table()
|
private val beliefsTable = Table()
|
||||||
|
|
||||||
init {
|
override fun getFixedContent(): WidgetGroup? {
|
||||||
|
return Table().apply {
|
||||||
defaults().pad(5f)
|
defaults().pad(5f)
|
||||||
align(Align.top)
|
align(Align.top)
|
||||||
loadReligionButtons()
|
|
||||||
|
|
||||||
civStatsTable.defaults().left().pad(5f)
|
civStatsTable.defaults().left().pad(5f)
|
||||||
statsTable.defaults().left().pad(5f)
|
|
||||||
beliefsTable.defaults().padBottom(20f)
|
|
||||||
civStatsTable.addCivSpecificStats()
|
civStatsTable.addCivSpecificStats()
|
||||||
add(civStatsTable).row()
|
add(civStatsTable).row()
|
||||||
add(religionButtons).row()
|
add(religionButtons).row()
|
||||||
add(religionButtonLabel)
|
add(religionButtonLabel)
|
||||||
addSeparator()
|
addSeparator()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
defaults().pad(5f)
|
||||||
|
align(Align.top)
|
||||||
|
loadReligionButtons()
|
||||||
|
|
||||||
|
statsTable.defaults().left().pad(5f)
|
||||||
|
beliefsTable.defaults().padBottom(20f)
|
||||||
loadReligion(persistableData.selectedReligion)
|
loadReligion(persistableData.selectedReligion)
|
||||||
add(statsTable).row()
|
add(statsTable).row()
|
||||||
add(beliefsTable).pad(20f)
|
add(beliefsTable).pad(20f)
|
||||||
@ -110,6 +120,8 @@ class ReligionOverviewTab(
|
|||||||
statsTable.clear()
|
statsTable.clear()
|
||||||
beliefsTable.clear()
|
beliefsTable.clear()
|
||||||
religionButtonLabel.setText(religion.getReligionDisplayName().tr())
|
religionButtonLabel.setText(religion.getReligionDisplayName().tr())
|
||||||
|
religionButtonLabel.setFontSize(Constants.headingFontSize)
|
||||||
|
religionButtonLabel.color = Color.CORAL
|
||||||
|
|
||||||
for (belief in religion.getAllBeliefsOrdered()) {
|
for (belief in religion.getAllBeliefsOrdered()) {
|
||||||
beliefsTable.add(createBeliefDescription(belief)).row()
|
beliefsTable.add(createBeliefDescription(belief)).row()
|
||||||
|
Reference in New Issue
Block a user