From 491f2e107ef43bb3a0edae7c9274fe4c2dde860c Mon Sep 17 00:00:00 2001 From: Lance Ewing Date: Wed, 18 Sep 2024 23:56:30 +0100 Subject: [PATCH] Implemented dynamic updating of title in web version. --- .../main/java/com/agifans/agile/gwt/GwtAgileRunner.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java b/html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java index b86beec..7c4acff 100644 --- a/html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java +++ b/html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java @@ -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. @@ -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