Optimized imports
This commit is contained in:
parent
a9f9685dc2
commit
efb823c67d
19 changed files with 29 additions and 39 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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<TileInfo, TileGroup>()
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<String>)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue