mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-19 20:28:56 +07:00
Solved Application Not Responding errors when saving large games
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 340
|
versionCode 341
|
||||||
versionName "3.3.7-patch1"
|
versionName "3.3.8"
|
||||||
|
|
||||||
archivesBaseName = "Unciv"
|
archivesBaseName = "Unciv"
|
||||||
}
|
}
|
||||||
|
17
app.json
17
app.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"addons": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"buildpacks": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"description": "",
|
|
||||||
"env": {
|
|
||||||
},
|
|
||||||
"formation": {
|
|
||||||
},
|
|
||||||
"name": "UnCiv",
|
|
||||||
"scripts": {
|
|
||||||
},
|
|
||||||
"stack": "heroku-18"
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
|
|
||||||
<module>
|
|
||||||
<source path="com/unciv/game" />
|
|
||||||
</module>
|
|
@ -12,6 +12,7 @@ import com.unciv.ui.pickerscreens.PickerScreen
|
|||||||
import com.unciv.ui.utils.enable
|
import com.unciv.ui.utils.enable
|
||||||
import com.unciv.ui.utils.onClick
|
import com.unciv.ui.utils.onClick
|
||||||
import com.unciv.ui.utils.toLabel
|
import com.unciv.ui.utils.toLabel
|
||||||
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
|
|
||||||
class SaveGameScreen : PickerScreen() {
|
class SaveGameScreen : PickerScreen() {
|
||||||
@ -55,9 +56,12 @@ class SaveGameScreen : PickerScreen() {
|
|||||||
|
|
||||||
rightSideButton.setText("Save game".tr())
|
rightSideButton.setText("Save game".tr())
|
||||||
rightSideButton.onClick {
|
rightSideButton.onClick {
|
||||||
|
rightSideButton.setText("Saving...".tr())
|
||||||
|
thread{
|
||||||
GameSaver().saveGame(UncivGame.Current.gameInfo, textField.text)
|
GameSaver().saveGame(UncivGame.Current.gameInfo, textField.text)
|
||||||
UncivGame.Current.setWorldScreen()
|
UncivGame.Current.setWorldScreen()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
rightSideButton.enable()
|
rightSideButton.enable()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener
|
|||||||
import com.badlogic.gdx.utils.viewport.ExtendViewport
|
import com.badlogic.gdx.utils.viewport.ExtendViewport
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
import com.unciv.models.gamebasics.tr
|
import com.unciv.models.gamebasics.tr
|
||||||
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
open class CameraStageBaseScreen : Screen {
|
open class CameraStageBaseScreen : Screen {
|
||||||
|
|
||||||
@ -128,7 +129,7 @@ fun Actor.center(parent:Stage){ centerX(parent); centerY(parent)}
|
|||||||
fun Actor.onClickEvent(sound: String = "click", function: (event: InputEvent?, x: Float, y: Float) -> Unit) {
|
fun Actor.onClickEvent(sound: String = "click", function: (event: InputEvent?, x: Float, y: Float) -> Unit) {
|
||||||
this.addListener(object : ClickListener() {
|
this.addListener(object : ClickListener() {
|
||||||
override fun clicked(event: InputEvent?, x: Float, y: Float) {
|
override fun clicked(event: InputEvent?, x: Float, y: Float) {
|
||||||
if (sound != "") Sounds.play(sound)
|
if (sound != "") thread{Sounds.play(sound)}
|
||||||
function(event, x, y)
|
function(event, x, y)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user