From 4fa77ac20bbf57c5f8f7aec520c2693848eaee8f Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 7 Sep 2020 22:38:05 +0300 Subject: [PATCH] Mod management screen scrolls lists separately --- core/src/com/unciv/logic/automation/UnitAutomation.kt | 2 +- core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index af921b8c23..da57e2cff0 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -37,7 +37,7 @@ object UnitAutomation { return true } - // Nothing immediate, let's look further. Number increases exponentially with distance - at 10 this took a looong time + // Nothing immediate, lets look further. Number increases exponentially with distance - at 10 this took a looong time for (tile in unit.currentTile.getTilesInDistance(5)) if (isGoodTileToExplore(unit, tile)) { unit.movement.headTowards(tile) diff --git a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt index 5809cc5b87..e1c9186de8 100644 --- a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt @@ -1,6 +1,7 @@ package com.unciv.ui.pickerscreens import com.badlogic.gdx.Gdx +import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextArea import com.badlogic.gdx.scenes.scene2d.ui.TextButton @@ -21,7 +22,7 @@ class ModManagementScreen: PickerScreen() { setDefaultCloseAction(MainMenuScreen()) refresh() - topTable.add(modTable).pad(10f) + topTable.add(ScrollPane(modTable)).height(topTable.height).pad(10f) downloadTable.add(getDownloadButton()).row() @@ -59,7 +60,7 @@ class ModManagementScreen: PickerScreen() { } } - topTable.add(downloadTable) + topTable.add(ScrollPane(downloadTable)).height(topTable.height) } fun getDownloadButton(): TextButton {