mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 05:14:32 -04:00
Don't display empty civilopedia categories in mods that don't have them
This commit is contained in:
parent
a495e5c8fe
commit
efd576e195
@ -221,7 +221,8 @@ class CivilopediaScreen(
|
|||||||
buttonTable.defaults().pad(10f)
|
buttonTable.defaults().pad(10f)
|
||||||
|
|
||||||
var currentX = 10f // = padLeft
|
var currentX = 10f // = padLeft
|
||||||
for (categoryKey in categoryToEntries.keys) {
|
for ((categoryKey, entries) in categoryToEntries) {
|
||||||
|
if (entries.isEmpty()) continue
|
||||||
val icon = if (categoryKey.headerIcon.isNotEmpty()) ImageGetter.getImage(categoryKey.headerIcon) else null
|
val icon = if (categoryKey.headerIcon.isNotEmpty()) ImageGetter.getImage(categoryKey.headerIcon) else null
|
||||||
val button = IconTextButton(categoryKey.label, icon)
|
val button = IconTextButton(categoryKey.label, icon)
|
||||||
button.addTooltip(categoryKey.key)
|
button.addTooltip(categoryKey.key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user