This ArcOS wiki is still under active development, and contains errors and unfinished pages.

Changing the titlebar

Every normal window has a titlebar at the top. For your app, its title and icon are set by the _app.tpa file as metadata.name and metadata.icon. However, I've implemented two stores that allow you to changes these values on the fly.

The window title

To change the window title, use this piece of code:

this.windowTitle.set("");

You can also call windowTitle directly to get the current window title:

const title = this.windowTitle();

Window icon

Similarly to the window title, you can use the following code to change the window icon. In this example I'm using direct file access to get the new icon from a file named gameover.png:

const gameOver = await this.fs.direct(util.join(workingDirectory, "gameover.png"));

this.windowTitle.set(gameOver);

Again, you can directly call this property to see its value:

const icon = this.windowIcon();

Last updated