add splashscreen for mobile-dev

This commit is contained in:
Anthony Calosa
2024-10-06 23:13:51 +08:00
parent 5d959dc963
commit f4671133f3
6 changed files with 25 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import org.apache.commons.lang3.tuple.Pair;
import javax.imageio.ImageIO;
import java.awt.Desktop;
import java.awt.SplashScreen;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
@@ -89,6 +90,14 @@ public class Main {
System.exit(0);
}
@Override
public void closeSplashScreen() {
SplashScreen splash = SplashScreen.getSplashScreen();
if (splash != null) {
splash.close();
}
}
@Override
public boolean isTablet() {
return true; //treat desktop the same as a tablet