diff --git a/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt b/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt index b58af07b..41b41c2f 100644 --- a/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt @@ -1,10 +1,8 @@ package com.unciv.ui.cityscreen -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.utils.Align import com.unciv.UncivGame import com.unciv.logic.city.CityInfo @@ -14,6 +12,7 @@ import com.unciv.models.stats.Stat import com.unciv.models.translations.tr import com.unciv.ui.utils.* import java.text.DecimalFormat +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseScreen.skin) { private val pad = 10f diff --git a/core/src/com/unciv/ui/cityscreen/CityScreen.kt b/core/src/com/unciv/ui/cityscreen/CityScreen.kt index cc795252..2b1113c1 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreen.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreen.kt @@ -1,24 +1,21 @@ package com.unciv.ui.cityscreen import com.badlogic.gdx.Input -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.InputEvent import com.badlogic.gdx.scenes.scene2d.InputListener import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.utils.Align import com.unciv.UncivGame import com.unciv.logic.HexMath import com.unciv.logic.city.CityInfo import com.unciv.logic.city.IConstruction import com.unciv.logic.map.TileInfo -import com.unciv.models.Tutorial -import com.unciv.models.translations.tr import com.unciv.ui.map.TileGroupMap import com.unciv.ui.tilegroups.TileSetStrings import com.unciv.ui.utils.* import java.util.* +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class CityScreen(internal val city: CityInfo): CameraStageBaseScreen() { var selectedTile: TileInfo? = null diff --git a/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt b/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt index 9d23ee99..84e06ee6 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt @@ -2,7 +2,6 @@ package com.unciv.ui.cityscreen import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.scenes.scene2d.ui.TextField import com.badlogic.gdx.utils.Align import com.unciv.models.translations.tr diff --git a/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt b/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt index 140ae624..7a7aa9a9 100644 --- a/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt +++ b/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt @@ -7,7 +7,6 @@ import com.unciv.logic.map.TileInfo import com.unciv.ui.tilegroups.TileGroup import com.unciv.ui.tilegroups.TileSetStrings import com.unciv.ui.utils.ImageGetter -import com.unciv.ui.utils.center import com.unciv.ui.utils.centerX class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo, tileSetStrings: TileSetStrings) : TileGroup(tileInfo,tileSetStrings) { diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt index f859c3b6..0b94cc66 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt @@ -1,16 +1,17 @@ package com.unciv.ui.cityscreen -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Table import com.unciv.logic.city.CityInfo import com.unciv.logic.city.IConstruction import com.unciv.logic.city.PerpetualConstruction -import com.unciv.ui.utils.ImageGetter import com.unciv.models.ruleset.Building import com.unciv.models.ruleset.unit.BaseUnit import com.unciv.models.translations.tr -import com.unciv.ui.utils.* +import com.unciv.ui.utils.ImageGetter +import com.unciv.ui.utils.surroundWithCircle +import com.unciv.ui.utils.toLabel +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class ConstructionInfoTable(val city: CityInfo): Table() { val selectedConstructionTable = Table() diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt index eacd911b..ebb9d3a9 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt @@ -1,6 +1,5 @@ package com.unciv.ui.cityscreen -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.ui.Table @@ -15,6 +14,7 @@ import com.unciv.models.stats.Stat import com.unciv.models.translations.tr import com.unciv.ui.cityscreen.ConstructionInfoTable.Companion.turnOrTurns import com.unciv.ui.utils.* +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScreen.skin) { /* -1 = Nothing, >= 0 queue entry (0 = current construction) */ diff --git a/core/src/com/unciv/ui/mapeditor/EditorMapHolder.kt b/core/src/com/unciv/ui/mapeditor/EditorMapHolder.kt index 726a4ccd..a398d82c 100644 --- a/core/src/com/unciv/ui/mapeditor/EditorMapHolder.kt +++ b/core/src/com/unciv/ui/mapeditor/EditorMapHolder.kt @@ -1,15 +1,16 @@ package com.unciv.ui.mapeditor import com.badlogic.gdx.math.Vector2 -import com.unciv.logic.map.TileMap -import com.unciv.logic.map.TileInfo -import com.unciv.ui.tilegroups.TileGroup -import com.unciv.ui.tilegroups.TileSetStrings -import com.unciv.ui.utils.onClick -import com.unciv.ui.map.TileGroupMap -import com.unciv.ui.utils.* import com.unciv.logic.HexMath import com.unciv.logic.civilization.CivilizationInfo +import com.unciv.logic.map.TileInfo +import com.unciv.logic.map.TileMap +import com.unciv.ui.map.TileGroupMap +import com.unciv.ui.tilegroups.TileGroup +import com.unciv.ui.tilegroups.TileSetStrings +import com.unciv.ui.utils.ZoomableScrollPane +import com.unciv.ui.utils.center +import com.unciv.ui.utils.onClick class EditorMapHolder(internal val mapEditorScreen: MapEditorScreen, internal val tileMap: TileMap): ZoomableScrollPane() { val tileGroups = HashMap() diff --git a/core/src/com/unciv/ui/mapeditor/LoadMapScreen.kt b/core/src/com/unciv/ui/mapeditor/LoadMapScreen.kt index b7d046d7..ec5932ed 100644 --- a/core/src/com/unciv/ui/mapeditor/LoadMapScreen.kt +++ b/core/src/com/unciv/ui/mapeditor/LoadMapScreen.kt @@ -1,6 +1,5 @@ package com.unciv.ui.mapeditor -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Table @@ -12,6 +11,7 @@ import com.unciv.models.translations.tr import com.unciv.ui.pickerscreens.PickerScreen import com.unciv.ui.saves.Gzip import com.unciv.ui.utils.* +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class LoadMapScreen(previousMap: TileMap?) : PickerScreen(){ var chosenMap = "" diff --git a/core/src/com/unciv/ui/mapeditor/MapDownloadPopup.kt b/core/src/com/unciv/ui/mapeditor/MapDownloadPopup.kt index 977f8cc1..d5342a2c 100644 --- a/core/src/com/unciv/ui/mapeditor/MapDownloadPopup.kt +++ b/core/src/com/unciv/ui/mapeditor/MapDownloadPopup.kt @@ -1,15 +1,16 @@ package com.unciv.ui.mapeditor -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.Gdx -import com.badlogic.gdx.scenes.scene2d.ui.* -import com.badlogic.gdx.utils.Align +import com.badlogic.gdx.scenes.scene2d.ui.Table +import com.badlogic.gdx.scenes.scene2d.ui.TextButton +import com.badlogic.gdx.scenes.scene2d.ui.TextField import com.unciv.UncivGame import com.unciv.logic.MapSaver import com.unciv.ui.saves.Gzip import com.unciv.ui.utils.* import com.unciv.ui.worldscreen.mainmenu.DropBox import kotlin.concurrent.thread +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class MapDownloadPopup(loadMapScreen: LoadMapScreen): Popup(loadMapScreen) { private val contentTable = Table() diff --git a/core/src/com/unciv/ui/mapeditor/NewMapScreen.kt b/core/src/com/unciv/ui/mapeditor/NewMapScreen.kt index 397753f2..9a889a7b 100644 --- a/core/src/com/unciv/ui/mapeditor/NewMapScreen.kt +++ b/core/src/com/unciv/ui/mapeditor/NewMapScreen.kt @@ -1,6 +1,5 @@ package com.unciv.ui.mapeditor -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.Gdx import com.badlogic.gdx.scenes.scene2d.ui.Table import com.unciv.MainMenuScreen @@ -14,6 +13,7 @@ import com.unciv.ui.newgamescreen.MapParametersTable import com.unciv.ui.pickerscreens.PickerScreen import com.unciv.ui.utils.* import kotlin.concurrent.thread +import com.unciv.ui.utils.AutoScrollPane as ScrollPane /** New map generation screen */ class NewMapScreen : PickerScreen() { diff --git a/core/src/com/unciv/ui/saves/LoadGameScreen.kt b/core/src/com/unciv/ui/saves/LoadGameScreen.kt index b5244d8b..e4932e79 100644 --- a/core/src/com/unciv/ui/saves/LoadGameScreen.kt +++ b/core/src/com/unciv/ui/saves/LoadGameScreen.kt @@ -1,6 +1,5 @@ package com.unciv.ui.saves -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.CheckBox @@ -14,6 +13,7 @@ import com.unciv.ui.pickerscreens.PickerScreen import com.unciv.ui.utils.* import java.text.SimpleDateFormat import java.util.* +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class LoadGameScreen(previousScreen:CameraStageBaseScreen) : PickerScreen() { lateinit var selectedSave:String diff --git a/core/src/com/unciv/ui/saves/SaveGameScreen.kt b/core/src/com/unciv/ui/saves/SaveGameScreen.kt index cb4b63c4..ffedeff1 100644 --- a/core/src/com/unciv/ui/saves/SaveGameScreen.kt +++ b/core/src/com/unciv/ui/saves/SaveGameScreen.kt @@ -1,10 +1,10 @@ package com.unciv.ui.saves -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.Gdx -import com.badlogic.gdx.scenes.scene2d.Actor -import com.badlogic.gdx.scenes.scene2d.ui.* -import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener +import com.badlogic.gdx.scenes.scene2d.ui.CheckBox +import com.badlogic.gdx.scenes.scene2d.ui.Table +import com.badlogic.gdx.scenes.scene2d.ui.TextButton +import com.badlogic.gdx.scenes.scene2d.ui.TextField import com.badlogic.gdx.utils.Json import com.unciv.UncivGame import com.unciv.logic.GameSaver @@ -12,6 +12,7 @@ import com.unciv.models.translations.tr import com.unciv.ui.pickerscreens.PickerScreen import com.unciv.ui.utils.* import kotlin.concurrent.thread +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class SaveGameScreen : PickerScreen() { diff --git a/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt b/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt index f18d6b17..a9bda909 100644 --- a/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt @@ -5,7 +5,6 @@ import com.unciv.logic.city.CityInfo import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.MapUnit import com.unciv.logic.map.TileInfo -import com.unciv.ui.utils.CameraStageBaseScreen import com.unciv.ui.worldscreen.WorldScreen diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index 74616380..72368ea6 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -1,6 +1,5 @@ package com.unciv.ui.trade -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.SplitPane import com.badlogic.gdx.scenes.scene2d.ui.Table @@ -21,6 +20,7 @@ import com.unciv.logic.trade.TradeType import com.unciv.models.translations.tr import com.unciv.ui.utils.* import kotlin.math.roundToInt +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class DiplomacyScreen(val viewingCiv:CivilizationInfo):CameraStageBaseScreen() { diff --git a/core/src/com/unciv/ui/trade/OffersListScroll.kt b/core/src/com/unciv/ui/trade/OffersListScroll.kt index 3d74b27d..0c74622f 100644 --- a/core/src/com/unciv/ui/trade/OffersListScroll.kt +++ b/core/src/com/unciv/ui/trade/OffersListScroll.kt @@ -1,9 +1,7 @@ package com.unciv.ui.trade import com.badlogic.gdx.graphics.Color -import com.unciv.ui.utils.AutoScrollPane as ScrollPane import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.Constants import com.unciv.UncivGame import com.unciv.logic.trade.TradeOffer @@ -17,6 +15,7 @@ import com.unciv.ui.utils.disable import com.unciv.ui.utils.onClick import com.unciv.ui.utils.toTextButton import kotlin.math.min +import com.unciv.ui.utils.AutoScrollPane as ScrollPane class OffersListScroll(val onOfferClicked: (TradeOffer) -> Unit) : ScrollPane(null) { val table = Table(CameraStageBaseScreen.skin).apply { defaults().pad(5f) } diff --git a/core/src/com/unciv/ui/trade/TradeTable.kt b/core/src/com/unciv/ui/trade/TradeTable.kt index 6be2d4c1..bcd1e254 100644 --- a/core/src/com/unciv/ui/trade/TradeTable.kt +++ b/core/src/com/unciv/ui/trade/TradeTable.kt @@ -2,7 +2,6 @@ package com.unciv.ui.trade import com.badlogic.gdx.scenes.scene2d.Stage import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.trade.TradeLogic import com.unciv.logic.trade.TradeRequest diff --git a/core/src/com/unciv/ui/tutorials/TutorialRender.kt b/core/src/com/unciv/ui/tutorials/TutorialRender.kt index 07aa7df9..72df0584 100644 --- a/core/src/com/unciv/ui/tutorials/TutorialRender.kt +++ b/core/src/com/unciv/ui/tutorials/TutorialRender.kt @@ -1,11 +1,9 @@ package com.unciv.ui.tutorials import com.badlogic.gdx.Gdx -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.utils.Array import com.unciv.Constants import com.unciv.models.Tutorial -import com.unciv.models.translations.tr import com.unciv.ui.utils.* data class TutorialForRender(val tutorial: Tutorial, val texts: Array) diff --git a/core/src/com/unciv/ui/utils/Popup.kt b/core/src/com/unciv/ui/utils/Popup.kt index ca7d4eac..e5f6d726 100644 --- a/core/src/com/unciv/ui/utils/Popup.kt +++ b/core/src/com/unciv/ui/utils/Popup.kt @@ -8,7 +8,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.utils.Align import com.unciv.Constants -import com.unciv.models.translations.tr /** * Base class for all Popups, i.e. Tables that get rendered in the middle of a screen and on top of everything else diff --git a/core/src/com/unciv/ui/utils/YesNoPopup.kt b/core/src/com/unciv/ui/utils/YesNoPopup.kt index e451e316..028b69e5 100644 --- a/core/src/com/unciv/ui/utils/YesNoPopup.kt +++ b/core/src/com/unciv/ui/utils/YesNoPopup.kt @@ -1,8 +1,6 @@ package com.unciv.ui.utils -import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.UncivGame -import com.unciv.models.translations.tr class YesNoPopup(question:String, action:()->Unit, screen: CameraStageBaseScreen = UncivGame.Current.worldScreen, restoredefault:()->Unit = {}) : Popup(screen){