Reformat "object:" to "object :" according to the official kotlin style guide (#2666)

This commit is contained in:
k.h.lai 2020-05-26 21:12:29 +08:00 committed by GitHub
parent 1f7d9ead20
commit a9d9b5a64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ class CityScreen(internal val city: CityInfo): CameraStageBaseScreen() {
game.setScreen(CityScreen(civInfo.cities[indexOfNextCity]))
}
private fun getKeyboardListener(): InputListener = object: InputListener() {
private fun getKeyboardListener(): InputListener = object : InputListener() {
override fun keyDown(event: InputEvent?, keyCode: Int): Boolean {
if (event == null) return super.keyDown(event, keyCode)
when(event.keyCode) {

View File

@ -23,7 +23,7 @@ open class ZoomableScrollPane: ScrollPane(null) {
private fun addZoomListeners() {
addListener(object: InputListener() {
addListener(object : InputListener() {
override fun scrolled(event: InputEvent?, x: Float, y: Float, amount: Int): Boolean {
if(amount > 0) zoom(scaleX * 0.8f)
else zoom(scaleX / 0.8f)