mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 02:28:15 +03:00
Reworked a bit windows opening
This commit is contained in:
parent
bc8dfc0394
commit
25e4c3f6f2
5 changed files with 23 additions and 12 deletions
|
@ -22,7 +22,7 @@
|
|||
"fullScreen": false,
|
||||
"alwaysOnTop": false,
|
||||
"icon": "/public/icons/64x64.png",
|
||||
"enableInspector": true,
|
||||
"enableInspector": false,
|
||||
"borderless": false,
|
||||
"maximize": false,
|
||||
"hidden": true,
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
settingsButton!.onmouseleave = () => {
|
||||
settingsButton?.classList.remove('hovered');
|
||||
};
|
||||
|
||||
Window.current.show();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,8 @@ import Prefix from '../../core/Prefix';
|
|||
|
||||
export default (launcher: Launcher): Promise<void> => {
|
||||
return new Promise(async (resolve) => {
|
||||
launcher.state!.launchButton!.style['display'] = 'none';
|
||||
|
||||
Prefix.exists().then((exists) => {
|
||||
if (!exists)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue