From 9f0a1d863ea23e760c9ef3012429047977390e1c Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Nov 2022 08:59:24 -0400 Subject: [PATCH] Fixed #7815 --- core/src/mindustry/editor/MapEditorDialog.java | 2 +- core/src/mindustry/ui/dialogs/MapPlayDialog.java | 2 +- core/src/mindustry/world/blocks/logic/CanvasBlock.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/editor/MapEditorDialog.java b/core/src/mindustry/editor/MapEditorDialog.java index 5f387c1d74..d727c950d7 100644 --- a/core/src/mindustry/editor/MapEditorDialog.java +++ b/core/src/mindustry/editor/MapEditorDialog.java @@ -464,7 +464,7 @@ public class MapEditorDialog extends Dialog implements Disposable{ } public void build(){ - float size = 58f; + float size = mobile ? 50f : 58f; clearChildren(); table(cont -> { diff --git a/core/src/mindustry/ui/dialogs/MapPlayDialog.java b/core/src/mindustry/ui/dialogs/MapPlayDialog.java index 29f65379df..167890f776 100644 --- a/core/src/mindustry/ui/dialogs/MapPlayDialog.java +++ b/core/src/mindustry/ui/dialogs/MapPlayDialog.java @@ -63,7 +63,7 @@ public class MapPlayDialog extends BaseDialog{ modes.button(mode.toString(), Styles.flatToggleMenut, () -> { selectedGamemode = mode; rules = map.applyRules(mode); - }).update(b -> b.setChecked(selectedGamemode == mode)).size(140f, 54f).disabled(!mode.valid(map)); + }).update(b -> b.setChecked(selectedGamemode == mode)).size(140f, mobile ? 44f : 54f).disabled(!mode.valid(map)); if(i++ % 2 == 1) modes.row(); } }); diff --git a/core/src/mindustry/world/blocks/logic/CanvasBlock.java b/core/src/mindustry/world/blocks/logic/CanvasBlock.java index be143559ee..9d1b445630 100644 --- a/core/src/mindustry/world/blocks/logic/CanvasBlock.java +++ b/core/src/mindustry/world/blocks/logic/CanvasBlock.java @@ -196,7 +196,7 @@ public class CanvasBlock extends Block{ } }, new GridImage(canvasSize, canvasSize){{ touchable = Touchable.disabled; - }}).size(mobile && !Core.graphics.isPortrait() ? 290f : 480f); + }}).size(mobile && !Core.graphics.isPortrait() ? Math.min(290f, Core.graphics.getHeight() / Scl.scl(1f) - 75f / Scl.scl(1f)) : 480f); }); dialog.cont.row();