mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 16:28:40 +07:00
Gradle update, offerButton.isEnabled = false in initial (#8600)
This commit is contained in:
@ -28,7 +28,7 @@ class CustomFileLocationHelperAndroid(private val activity: Activity) : CustomFi
|
|||||||
cursor.use {
|
cursor.use {
|
||||||
// we should have a direct URI to a file, so first is enough
|
// we should have a direct URI to a file, so first is enough
|
||||||
if (it?.moveToFirst() == true) {
|
if (it?.moveToFirst() == true) {
|
||||||
it.getString(it.getColumnIndex(OpenableColumns.DISPLAY_NAME))
|
it.getString(it.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
|
||||||
} else ""
|
} else ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
|
||||||
classpath("de.richsource.gradle.plugins:gwt-gradle-plugin:0.6")
|
classpath("de.richsource.gradle.plugins:gwt-gradle-plugin:0.6")
|
||||||
classpath("com.android.tools.build:gradle:7.1.3")
|
classpath("com.android.tools.build:gradle:7.4.1")
|
||||||
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
|
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,13 +10,13 @@ import com.unciv.ui.utils.extensions.isEnabled
|
|||||||
import com.unciv.ui.utils.extensions.onClick
|
import com.unciv.ui.utils.extensions.onClick
|
||||||
import com.unciv.ui.utils.extensions.toTextButton
|
import com.unciv.ui.utils.extensions.toTextButton
|
||||||
|
|
||||||
class TradeTable(val otherCivilization: Civilization, stage: DiplomacyScreen): Table(BaseScreen.skin) {
|
class TradeTable(private val otherCivilization: Civilization, stage: DiplomacyScreen): Table(BaseScreen.skin) {
|
||||||
val currentPlayerCiv = otherCivilization.gameInfo.getCurrentPlayerCivilization()
|
val currentPlayerCiv = otherCivilization.gameInfo.getCurrentPlayerCivilization()
|
||||||
var tradeLogic = TradeLogic(currentPlayerCiv,otherCivilization)
|
var tradeLogic = TradeLogic(currentPlayerCiv,otherCivilization)
|
||||||
var offerColumnsTable = OfferColumnsTable(tradeLogic, stage) { onChange() }
|
var offerColumnsTable = OfferColumnsTable(tradeLogic, stage) { onChange() }
|
||||||
// This is so that after a trade has been traded, we can switch out the offersToDisplay to start anew - this is the easiest way
|
// This is so that after a trade has been traded, we can switch out the offersToDisplay to start anew - this is the easiest way
|
||||||
private var offerColumnsTableWrapper = Table()
|
private var offerColumnsTableWrapper = Table()
|
||||||
val offerButton = "Offer trade".toTextButton()
|
private val offerButton = "Offer trade".toTextButton().apply{ isEnabled = false }
|
||||||
|
|
||||||
private fun isTradeOffered() = otherCivilization.tradeRequests.any { it.requestingCiv == currentPlayerCiv.civName }
|
private fun isTradeOffered() = otherCivilization.tradeRequests.any { it.requestingCiv == currentPlayerCiv.civName }
|
||||||
|
|
||||||
|
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
|||||||
|
#Mon Feb 06 15:51:42 CST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
Reference in New Issue
Block a user