mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-12 19:10:12 +07:00
UnitTable no longer scrolls when unnecessary
This commit is contained in:
parent
13def8739e
commit
30a2eda15f
@ -33,8 +33,8 @@ allprojects {
|
||||
version = '1.0.1'
|
||||
ext {
|
||||
appName = "Unciv"
|
||||
appCodeNumber = 391
|
||||
appVersion = "3.6.6"
|
||||
appCodeNumber = 392
|
||||
appVersion = "3.6.6-resubmit"
|
||||
|
||||
gdxVersion = '1.9.10'
|
||||
roboVMVersion = '2.3.1'
|
||||
|
@ -280,7 +280,6 @@ class NextTurnAutomation{
|
||||
otherCiv.tradeRequests.add(tradeRequest)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun getMinDistanceBetweenCities(civ1: CivilizationInfo, civ2: CivilizationInfo): Int {
|
||||
|
@ -127,8 +127,8 @@ class TradeEvaluation{
|
||||
val civToDeclareWarOn = civInfo.gameInfo.getCivilization(offer.name)
|
||||
val threatToThem = Automation().threatAssessment(civInfo,civToDeclareWarOn)
|
||||
|
||||
if(civInfo.isAtWarWith(civToDeclareWarOn)){
|
||||
when (threatToThem) {
|
||||
if (!civInfo.isAtWarWith(civToDeclareWarOn)) return 0 // why should we pay you to go fight someone...?
|
||||
else when (threatToThem) {
|
||||
ThreatLevel.VeryLow -> return 0
|
||||
ThreatLevel.Low -> return 0
|
||||
ThreatLevel.Medium -> return 100
|
||||
@ -136,8 +136,6 @@ class TradeEvaluation{
|
||||
ThreatLevel.VeryHigh -> return 1000
|
||||
}
|
||||
}
|
||||
else return 0 // why should we pay you to go fight someone...?
|
||||
}
|
||||
TradeType.City -> {
|
||||
val city = tradePartner.cities.first { it.id==offer.name }
|
||||
val stats = city.cityStats.currentCityStats
|
||||
|
@ -70,7 +70,7 @@ class EmpireOverviewScreen(private val viewingPlayer:CivilizationInfo) : CameraS
|
||||
val setUnitsButton = TextButton("Units".tr(), skin)
|
||||
setUnitsButton.onClick {
|
||||
centerTable.clear()
|
||||
centerTable.add(ScrollPane(getUnitTable())).height(stage.height * 0.8f)
|
||||
centerTable.add(ScrollPane(getUnitTable()).apply { setOverscroll(false,false) }).height(stage.height * 0.8f)
|
||||
centerTable.pack()
|
||||
}
|
||||
topTable.add(setUnitsButton)
|
||||
|
Loading…
Reference in New Issue
Block a user