aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src/main.ts
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 18:36:10 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 18:36:10 +0200
commit80b8b2c318fbb04853a813c438c896a4b2f8b37d (patch)
treedeebbe224307a6d78948a6c2c2e5c8dfcf3540a9 /src-ui/src/main.ts
parent578516b2bcbfa2c80e02d51951d99e3083360749 (diff)
downloadFlightCore-80b8b2c318fbb04853a813c438c896a4b2f8b37d.tar.gz
FlightCore-80b8b2c318fbb04853a813c438c896a4b2f8b37d.zip
Return GameInstall object instead of tuple
The object contains the path Titanfall2 is installed in, as well as how it was installed (Steam, Origin, EA-App)
Diffstat (limited to 'src-ui/src/main.ts')
-rw-r--r--src-ui/src/main.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 61fec575..24c9f04a 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -11,6 +11,11 @@ const button_in_update_string = "Updating...";
const button_play_string = "Launch Northstar";
const button_manual_find_string = "Manually select Titanfall2 install location";
+interface GameInstall {
+ game_path: string;
+ install_type: number;
+ }
+
// Stores the overall state of the application
var globalState = {
gamepath: "",
@@ -181,13 +186,15 @@ document.addEventListener("DOMContentLoaded", async function () {
// Get install location
await invoke("find_game_install_location_caller", { gamePath: globalState.gamepath })
- .then((game_path) => {
+ .then((game_install) => {
// Found some gamepath
- console.log(game_path);
+ console.log(game_install);
+
+ let game_install_obj = game_install as GameInstall;
// Change omni-button content based on whether game install was found
- let game_path_str = game_path as string
+ let game_path_str = game_install_obj.game_path as string
omniButtonEl.textContent = button_install_string;
installLocationHolderEl.value = game_path_str;
globalState.gamepath = game_path_str;