From 8bc59fb67c93db532152c82878eb1e960a4dfede Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 29 Jun 2019 13:50:59 -0400 Subject: [PATCH] Fixed startup logo not fitting on screen --- core/src/io/anuke/mindustry/Mindustry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/Mindustry.java b/core/src/io/anuke/mindustry/Mindustry.java index 152cf6fcec..e5de1aee0b 100644 --- a/core/src/io/anuke/mindustry/Mindustry.java +++ b/core/src/io/anuke/mindustry/Mindustry.java @@ -86,7 +86,8 @@ public class Mindustry extends ApplicationCore{ Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()); Texture icon = new Texture("sprites/logotext.png"); - Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f); + float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth()); + Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width); Draw.flush(); icon.dispose();