mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 15:59:33 +07:00
[Linting] Some minor code purity stuff I came across (#10537)
* Centralize shift and control key detection (Unit multiselect now with right-shift too) * Lint of an ugly curly brace placement - otherwise the original was fine * Answer open question in comment * Follow a Gdx 1.12 deprecation * Another clarifying comment - on ScrollPane's built-in potential surprise that the constructor calls its own overridable public methods
This commit is contained in:
@ -256,11 +256,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
|
||||
throw UnsupportedOperationException("Use pushScreen or replaceCurrentScreen instead")
|
||||
}
|
||||
|
||||
override fun getScreen(): BaseScreen? {
|
||||
val curScreen = super.getScreen()
|
||||
return if (curScreen == null) { null } else { curScreen as BaseScreen
|
||||
}
|
||||
}
|
||||
override fun getScreen(): BaseScreen? = super.getScreen() as? BaseScreen
|
||||
|
||||
private fun setScreen(newScreen: BaseScreen) {
|
||||
debug("Setting new screen: %s, screenStack: %s", newScreen, screenStack)
|
||||
|
Reference in New Issue
Block a user