From 0c01c365f4cb4c8f9b191bf780f654c7a1d06a1a Mon Sep 17 00:00:00 2001 From: Panayotis Katsaloulis Date: Fri, 6 Nov 2020 16:19:59 +0200 Subject: [PATCH] feature: implement #185 --- TotalCrossSDK/src/main/java/totalcross/Launcher.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TotalCrossSDK/src/main/java/totalcross/Launcher.java b/TotalCrossSDK/src/main/java/totalcross/Launcher.java index 895b64728c..d1c2abdebb 100644 --- a/TotalCrossSDK/src/main/java/totalcross/Launcher.java +++ b/TotalCrossSDK/src/main/java/totalcross/Launcher.java @@ -96,6 +96,7 @@ final public class Launcher extends java.applet.Applet implements WindowListener private int toBpp = 24; private int toWidth = -1; private int toHeight = -1; + private boolean fullscreen = false; private String className; private boolean appletInitialized; // guich@500_1 private LauncherFrame frame; @@ -277,6 +278,10 @@ private class LauncherFrame extends Frame { private Insets insets; public LauncherFrame() { + if (fullscreen) { + setExtendedState(Frame.MAXIMIZED_BOTH); + setUndecorated(true); + } setBackground(new java.awt.Color(getScreenColor(mainWindow.getBackColor()))); setResizable(Settings.resizableWindow); // guich@570_54 setLayout(null); @@ -405,6 +410,7 @@ static void showInstructions() { System.out.println("* /scr android : Android (same of /scr 320x568x24)"); System.out.println(" /scr iphone : iPhone 8 resolution (same of /scr 750x1334x24 /density 2)"); System.out.println(" /scr ipad : iPad resolution (same of /scr 1536x2048x24 /density 2)"); + System.out.println(" /fullscreen : Use full-screen window"); System.out.println(" /pos x,y : Sets the openning position of the application"); System.out.println(" /uiStyle Flat : Flat user interface style"); System.out.println("* /uiStyle Vista : Vista user interface style"); @@ -518,6 +524,8 @@ protected void parseArguments(String clazz, String... args) { } } System.out.println("Screen is " + toWidth + "x" + toHeight + "x" + toBpp); + } else if (args[i].equalsIgnoreCase("/fullscreen")) { + fullscreen = true; } else if (args[i].equalsIgnoreCase("/r")) { ++i; } else if (args[i].equalsIgnoreCase("/pos")) /* x,y */