From c5db7ca5ac946970ee4c62d90c803f4fc1f5ec9e Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 20 Nov 2022 11:11:05 +0100 Subject: [PATCH] Fix scaling of dialog in dialog stage --- core/src/main/kotlin/com/last/commit/stages/DialogStage.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/com/last/commit/stages/DialogStage.kt b/core/src/main/kotlin/com/last/commit/stages/DialogStage.kt index 4ddb52f..2f230d8 100644 --- a/core/src/main/kotlin/com/last/commit/stages/DialogStage.kt +++ b/core/src/main/kotlin/com/last/commit/stages/DialogStage.kt @@ -18,7 +18,7 @@ class DialogStage(skin: Skin?) : Stage(ExtendViewport(512f, 512f)) { init { area = TextArea("#", skin) - area.width = Gdx.graphics.width.toFloat() + area.width = viewport.worldWidth area.height = 100f addActor(area) } @@ -39,6 +39,7 @@ class DialogStage(skin: Skin?) : Stage(ExtendViewport(512f, 512f)) { fun resize(width: Int, height: Int) { viewport.update(width, height, true) + area.width = viewport.worldWidth this.camera.update() }