From 18cf7fa1daf9ea0f3ba71ad0ee4d857e703bd4b4 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sat, 10 Sep 2022 19:31:50 +0200 Subject: Add initial front-end code for launching Northstar --- src-ui/src/main.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src-ui') diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index 63f73d73..70af0999 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -145,6 +145,23 @@ document.addEventListener("DOMContentLoaded", async function () { get_northstar_version_number_and_set_button_accordingly(omniButtonEl); break; + // Launch Northstar + case `${button_play_string} (${globalState.installed_northstar_version})`: + let game_install = { + game_path: globalState.gamepath, + install_type: installTypeHolderEl.textContent + } as GameInstall; + await invoke("launch_northstar", { gameInstall: game_install }) + .then((message) => { + console.log(message); + alert(message); + }) + .catch((error) => { + console.error(error); + alert(error); + }); + break; + // Do nothing when clicked during install/update case button_in_update_string: case button_in_install_string: -- cgit v1.2.3