Skip to content

Commit

Permalink
Implemented dynamic updating of title in web version.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Sep 18, 2024
1 parent 90cb573 commit 491f2e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ public void start(AppConfigItem appConfigItem) {
}
updateURLWithoutReloading(newURL);

// Set title for the browser tab.
if (HomeScreen.SIERRA_GAMES.contains(appConfigItem.getGameId().toLowerCase())) {
Gdx.graphics.setTitle(appConfigItem.getName());
} else {
Gdx.graphics.setTitle(appConfigItem.getName() + " - A fan made Sierra AGI game");
}

// The game data files have been stored/cached in the OPFS. We load it from
// there, using the gameUri as the identifier, and then pass it to the worker
// to decode.
Expand Down Expand Up @@ -278,6 +285,8 @@ public void reset() {
worker = null;

clearUrl();

Gdx.graphics.setTitle("AGILE - The web-based Sierra On-Line Adventure Game Interpreter (AGI)");
}

@Override
Expand Down

0 comments on commit 491f2e1

Please sign in to comment.