Gradle update, offerButton.isEnabled = false in initial (#8600)

This commit is contained in:
lishaoxia1985 2023-02-06 20:21:46 +08:00 committed by GitHub
parent 8f56a88990
commit 4b2d4a3877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -28,7 +28,7 @@ class CustomFileLocationHelperAndroid(private val activity: Activity) : CustomFi
cursor.use {
// we should have a direct URI to a file, so first is enough
if (it?.moveToFirst() == true) {
it.getString(it.getColumnIndex(OpenableColumns.DISPLAY_NAME))
it.getString(it.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
} else ""
}
}

View File

@ -23,7 +23,7 @@ buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
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")
}
}

View File

@ -10,13 +10,13 @@ import com.unciv.ui.utils.extensions.isEnabled
import com.unciv.ui.utils.extensions.onClick
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()
var tradeLogic = TradeLogic(currentPlayerCiv,otherCivilization)
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
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 }

View File

@ -1,5 +1,6 @@
#Mon Feb 06 15:51:42 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME