mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04:00
Fix GlobalPoliticsOverviewTable listing layout after switching back from diagram (#11934)
This commit is contained in:
parent
3eb07c5956
commit
7b3a683c74
@ -93,7 +93,7 @@ class GlobalPoliticsOverviewTable(
|
|||||||
/** Clears fixedContent and adds the header cells.
|
/** Clears fixedContent and adds the header cells.
|
||||||
* Needs to stay matched to [createGlobalPoliticsTable].
|
* Needs to stay matched to [createGlobalPoliticsTable].
|
||||||
*
|
*
|
||||||
* 9 Columns: 5 info, 4 separators. First gets an empty header for contend below = civ image
|
* 9 Columns: 5 info, 4 separators. The first column gets an empty header, the content below is the civ image
|
||||||
*/
|
*/
|
||||||
private fun createGlobalPoliticsHeader() = fixedContent.run {
|
private fun createGlobalPoliticsHeader() = fixedContent.run {
|
||||||
val diagramButton = "Show diagram".toTextButton().onClick(::updateDiagram)
|
val diagramButton = "Show diagram".toTextButton().onClick(::updateDiagram)
|
||||||
@ -264,7 +264,10 @@ class GlobalPoliticsOverviewTable(
|
|||||||
// Refresh content and determine landscape/portrait layout
|
// Refresh content and determine landscape/portrait layout
|
||||||
private fun updateDiagram() {
|
private fun updateDiagram() {
|
||||||
persistableData.showDiagram = true
|
persistableData.showDiagram = true
|
||||||
val politicsButton = "Show global politics".toTextButton().onClick(::updatePoliticsTable)
|
val politicsButton = "Show global politics".toTextButton().onClick {
|
||||||
|
updatePoliticsTable()
|
||||||
|
overviewScreen.resizePage(this) // Or else the header stays curernt size, which with any non-empty diagram is most of the client area
|
||||||
|
}
|
||||||
|
|
||||||
val toggleCityStatesButton: TextButton = Constants.cityStates.toTextButton().apply {
|
val toggleCityStatesButton: TextButton = Constants.cityStates.toTextButton().apply {
|
||||||
onClick {
|
onClick {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user