From f4421898680f7e971fe2931488dd570c24089faf Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 12 Sep 2024 20:06:58 +0800 Subject: [PATCH] update SplashScreen --- forge-gui-mobile/src/forge/screens/SplashScreen.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/SplashScreen.java b/forge-gui-mobile/src/forge/screens/SplashScreen.java index 11ed0c23358..920f304e868 100644 --- a/forge-gui-mobile/src/forge/screens/SplashScreen.java +++ b/forge-gui-mobile/src/forge/screens/SplashScreen.java @@ -11,6 +11,7 @@ import forge.animation.ForgeAnimation; import forge.assets.FSkin; import forge.assets.FSkinColor; import forge.assets.FSkinFont; +import forge.assets.FSkinImage; import forge.assets.FSkinTexture; import forge.toolbox.FButton; import forge.toolbox.FContainer; @@ -137,7 +138,7 @@ public class SplashScreen extends FContainer { } float hmod = Forge.isLandscapeMode() ? 1f : 1.3f; float ymod = 2.6f; - g.drawImage(splashTexture, Forge.getScreenWidth()/2 - (w*percentage*hmod)/2 , Forge.getScreenHeight()/2 - (h*percentage*hmod)/ymod, (w*percentage)*hmod, (h*percentage)*hmod); + g.drawImage(splashTexture, Forge.getScreenWidth()/2f - (w*percentage*hmod)/2 , Forge.getScreenHeight()/2f - (h*percentage*hmod)/ymod, (w*percentage)*hmod, (h*percentage)*hmod); y += h * 295f / 450f; if (disclaimerFont == null) { @@ -153,7 +154,7 @@ public class SplashScreen extends FContainer { float pbHeight = 57f / 450f * h; y += 78f / 450f * h; - float w2 = Forge.isLandscapeMode() ? Forge.getScreenWidth() / 2 : Forge.getScreenHeight() / 2; + float w2 = Forge.isLandscapeMode() ? Forge.getScreenWidth() / 2f : Forge.getScreenHeight() / 2f; float h2 = 57f / 450f * (w2/2); String version = "v. " + Forge.CURRENT_VERSION; @@ -280,7 +281,7 @@ public class SplashScreen extends FContainer { float xmod = Forge.getScreenHeight() > 1000 ? 1.5f : Forge.getScreenHeight() > 800 ? 1.3f : 1f; g.drawImage(FSkin.getLogo(), getWidth() / 2 - (FSkin.getLogo().getWidth() * xmod) / 2, getHeight() / 2 - (FSkin.getLogo().getHeight() * xmod) / 1.5f, FSkin.getLogo().getWidth() * xmod, FSkin.getLogo().getHeight() * xmod); } else { - g.drawImage(splashTexture, x, y, w, h); + g.drawImage(FSkinImage.LOGO, getWidth() / 2 - (FSkinImage.LOGO.getWidth() * 2f) / 2, getHeight() / 2 - (FSkinImage.LOGO.getHeight() * 2f) / 1.3f, FSkinImage.LOGO.getWidth() * 2f, FSkinImage.LOGO.getHeight() * 2f); } y += h * 295f / 450f; float padding = 20f / 450f * w;