From c2425afb5abf7bfa8a34cf984d85e1571ba8a3c6 Mon Sep 17 00:00:00 2001 From: Quillraven Date: Sun, 24 Mar 2024 21:16:50 +0100 Subject: [PATCH] convert multiline to single line string --- .../github/quillyjumper/system/GlProfilerSystem.kt | 9 ++++++++- .../quillraven/github/quillyjumper/tiled/TiledService.kt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/com/quillraven/github/quillyjumper/system/GlProfilerSystem.kt b/core/src/main/kotlin/com/quillraven/github/quillyjumper/system/GlProfilerSystem.kt index 4e3698f..522c5fe 100644 --- a/core/src/main/kotlin/com/quillraven/github/quillyjumper/system/GlProfilerSystem.kt +++ b/core/src/main/kotlin/com/quillraven/github/quillyjumper/system/GlProfilerSystem.kt @@ -9,7 +9,14 @@ class GlProfilerSystem : IntervalSystem() { private val profiler = GLProfiler(Gdx.graphics).apply { enable() } override fun onTick() { - Gdx.graphics.setTitle("bindings: ${profiler.textureBindings}, drawCalls: ${profiler.drawCalls}, calls: ${profiler.calls} fps: ${Gdx.app.graphics.framesPerSecond}") + Gdx.graphics.setTitle( + """ + |bindings: ${profiler.textureBindings}, + |drawCalls: ${profiler.drawCalls}, + |calls: ${profiler.calls} + |fps: ${Gdx.app.graphics.framesPerSecond} + """.trimMargin().replace(Regex("(\n*)\n"), "$1") + ) profiler.reset() } diff --git a/core/src/main/kotlin/com/quillraven/github/quillyjumper/tiled/TiledService.kt b/core/src/main/kotlin/com/quillraven/github/quillyjumper/tiled/TiledService.kt index bcd404d..01163a8 100644 --- a/core/src/main/kotlin/com/quillraven/github/quillyjumper/tiled/TiledService.kt +++ b/core/src/main/kotlin/com/quillraven/github/quillyjumper/tiled/TiledService.kt @@ -206,7 +206,7 @@ class TiledService( | Life: $life | Move: $speed | Damage: $damage - """.trimMargin() + """.trimMargin().replace(Regex("(\n*)\n"), "$1") } } }