From d0b70fd70d3614459c849b522301d6379de0ef19 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 5 Jun 2021 15:47:39 -0400 Subject: [PATCH] Fixed map view on left-padded iOS devices --- core/src/mindustry/editor/MapView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/editor/MapView.java b/core/src/mindustry/editor/MapView.java index fce417ecad..3dc9f8e239 100644 --- a/core/src/mindustry/editor/MapView.java +++ b/core/src/mindustry/editor/MapView.java @@ -241,14 +241,14 @@ public class MapView extends Element implements GestureListener{ image.setImageSize(editor.width(), editor.height()); - if(!ScissorStack.push(rect.set(x, y + Core.scene.marginBottom, width, height))){ + if(!ScissorStack.push(rect.set(x + Core.scene.marginLeft, y + Core.scene.marginBottom, width, height))){ return; } Draw.color(Pal.remove); Lines.stroke(2f); Lines.rect(centerx - sclwidth / 2 - 1, centery - sclheight / 2 - 1, sclwidth + 2, sclheight + 2); - editor.renderer.draw(centerx - sclwidth / 2, centery - sclheight / 2 + Core.scene.marginBottom, sclwidth, sclheight); + editor.renderer.draw(centerx - sclwidth / 2 + Core.scene.marginLeft, centery - sclheight / 2 + Core.scene.marginBottom, sclwidth, sclheight); Draw.reset(); if(grid){