diff --git a/neutralino.config.json b/neutralino.config.json index 4b15c2d..df0eb89 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -22,7 +22,7 @@ "fullScreen": false, "alwaysOnTop": false, "icon": "/public/icons/64x64.png", - "enableInspector": true, + "enableInspector": false, "borderless": false, "maximize": false, "hidden": true, diff --git a/src/index.svelte b/src/index.svelte index d93cbf3..cf9bd4a 100644 --- a/src/index.svelte +++ b/src/index.svelte @@ -36,8 +36,6 @@ settingsButton!.onmouseleave = () => { settingsButton?.classList.remove('hovered'); }; - - Window.current.show(); }); diff --git a/src/ts/Launcher.ts b/src/ts/Launcher.ts index 9984a50..384beff 100644 --- a/src/ts/Launcher.ts +++ b/src/ts/Launcher.ts @@ -36,19 +36,20 @@ export default class Launcher title: 'Settings', width: 900, height: 600, - enableInspector: true + enableInspector: false }); if (window.status) { this.settingsMenu = new Process(window.data!.pid); - this.settingsMenu.runningInterval = null; - /*this.settingsMenu.finish(() => { + this.settingsMenu.finish(() => { + this.settingsMenu = undefined; + Window.current.show(); }) - Window.current.hide();*/ + Window.current.hide(); } resolve(window.status); diff --git a/src/ts/launcher/State.ts b/src/ts/launcher/State.ts index ed18335..9463d52 100644 --- a/src/ts/launcher/State.ts +++ b/src/ts/launcher/State.ts @@ -1,9 +1,11 @@ -import Game from '../Game'; import type Launcher from '../Launcher'; -import Patch from '../Patch'; - import type { LauncherState } from '../types/Launcher'; +import Window from '../neutralino/Window'; + +import Game from '../Game'; +import Patch from '../Patch'; + export default class State { public launcher: Launcher; @@ -32,10 +34,18 @@ export default class State this.launchButton.onclick = () => { if (this.events[this._state]) - this.events[this._state].then((event) => event.default(this.launcher)); + { + this.events[this._state].then((event) => { + event.default(this.launcher).then(() => { + this.update(); + }); + }); + } }; - this.update(); + this.update().then(() => { + Window.current.show(); + }); } /** diff --git a/src/ts/launcher/states/Install.ts b/src/ts/launcher/states/Install.ts index c48492a..b3df921 100644 --- a/src/ts/launcher/states/Install.ts +++ b/src/ts/launcher/states/Install.ts @@ -5,6 +5,8 @@ import Prefix from '../../core/Prefix'; export default (launcher: Launcher): Promise => { return new Promise(async (resolve) => { + launcher.state!.launchButton!.style['display'] = 'none'; + Prefix.exists().then((exists) => { if (!exists) {