Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/title - setting window title #338

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions TotalCrossSDK/src/main/java/totalcross/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ static void showInstructions() {
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(" /title : Sets the window title");
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");
Expand Down Expand Up @@ -527,6 +528,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("/title")) {
frameTitle = args[++i];
} else if (args[i].equalsIgnoreCase("/r")) {
++i;
} else if (args[i].equalsIgnoreCase("/pos")) /* x,y */
Expand Down
6 changes: 4 additions & 2 deletions TotalCrossVM/src/nm/ui/linux/gfx_Graphics_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ bool graphicsStartup(ScreenSurface screen, int16 appTczAttr)
*(tcSettings.isFullScreenPtr)=true;
#endif
#ifdef SKIA_H
TCSDL_Init(screen, exeName, *(tcSettings.isFullScreenPtr));
char* title = getenv("TC_TITLE"); // setting window title
TCSDL_Init(screen, title ? title : exeName, *(tcSettings.isFullScreenPtr));
#elif !defined HEADLESS
DFBResult err;
IDirectFB *_dfb;
Expand Down Expand Up @@ -66,7 +67,8 @@ bool graphicsStartup(ScreenSurface screen, int16 appTczAttr)
screen->screenW = w;
screen->screenH = h;
#else
TCSDL_Init(screen, exeName, *(tcSettings.isFullScreenPtr));
char* title = getenv("TC_TITLE"); // setting window title
TCSDL_Init(screen, title ? title : exeName, *(tcSettings.isFullScreenPtr));
#endif
return true;
}
Expand Down