mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-11 00:08:58 +07:00
Hopefully resolved ANRs from WorldScreen updates
This commit is contained in:
@ -10,6 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.actions.Actions
|
|||||||
import com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
|
import com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
||||||
import com.badlogic.gdx.utils.Align
|
import com.badlogic.gdx.utils.Align
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
import com.unciv.MainMenuScreen
|
import com.unciv.MainMenuScreen
|
||||||
@ -75,7 +76,6 @@ import com.unciv.utils.concurrency.withGLContext
|
|||||||
import com.unciv.utils.debug
|
import com.unciv.utils.debug
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.coroutineScope
|
import kotlinx.coroutines.coroutineScope
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not create this screen without seriously thinking about the implications: this is the single most memory-intensive class in the application.
|
* Do not create this screen without seriously thinking about the implications: this is the single most memory-intensive class in the application.
|
||||||
@ -785,8 +785,11 @@ class WorldScreen(
|
|||||||
if (shouldUpdate) {
|
if (shouldUpdate) {
|
||||||
shouldUpdate = false
|
shouldUpdate = false
|
||||||
|
|
||||||
|
// Since updating the worldscreen can take a long time, *especially* the first time, we disable input processing to avoid ANRs
|
||||||
|
Gdx.input.inputProcessor = null
|
||||||
update()
|
update()
|
||||||
showTutorialsOnNextTurn()
|
showTutorialsOnNextTurn()
|
||||||
|
Gdx.input.inputProcessor = stage
|
||||||
}
|
}
|
||||||
// topBar.selectedCivLabel.setText(Gdx.graphics.framesPerSecond) // for framerate testing
|
// topBar.selectedCivLabel.setText(Gdx.graphics.framesPerSecond) // for framerate testing
|
||||||
|
|
||||||
|
@ -1724,11 +1724,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Applicable to: Conditional
|
Applicable to: Conditional
|
||||||
|
|
||||||
??? example "<upon discovering [tech]>"
|
|
||||||
Example: "<upon discovering [Agriculture]>"
|
|
||||||
|
|
||||||
Applicable to: Conditional
|
|
||||||
|
|
||||||
??? example "<after adopting [policy]>"
|
??? example "<after adopting [policy]>"
|
||||||
Example: "<after adopting [Oligarchy]>"
|
Example: "<after adopting [Oligarchy]>"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user