mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-10 12:49:37 +07:00
Fixed startup logo not fitting on screen
This commit is contained in:
parent
ab5319f3d1
commit
8bc59fb67c
@ -86,7 +86,8 @@ public class Mindustry extends ApplicationCore{
|
|||||||
Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
|
Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||||
|
|
||||||
Texture icon = new Texture("sprites/logotext.png");
|
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();
|
Draw.flush();
|
||||||
|
|
||||||
icon.dispose();
|
icon.dispose();
|
||||||
|
Loading…
Reference in New Issue
Block a user