mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 18:48:14 +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,
|
"fullScreen": false,
|
||||||
"alwaysOnTop": false,
|
"alwaysOnTop": false,
|
||||||
"icon": "/public/icons/64x64.png",
|
"icon": "/public/icons/64x64.png",
|
||||||
"enableInspector": true,
|
"enableInspector": false,
|
||||||
"borderless": false,
|
"borderless": false,
|
||||||
"maximize": false,
|
"maximize": false,
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
settingsButton!.onmouseleave = () => {
|
settingsButton!.onmouseleave = () => {
|
||||||
settingsButton?.classList.remove('hovered');
|
settingsButton?.classList.remove('hovered');
|
||||||
};
|
};
|
||||||
|
|
||||||
Window.current.show();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -36,19 +36,20 @@ export default class Launcher
|
||||||
title: 'Settings',
|
title: 'Settings',
|
||||||
width: 900,
|
width: 900,
|
||||||
height: 600,
|
height: 600,
|
||||||
enableInspector: true
|
enableInspector: false
|
||||||
});
|
});
|
||||||
|
|
||||||
if (window.status)
|
if (window.status)
|
||||||
{
|
{
|
||||||
this.settingsMenu = new Process(window.data!.pid);
|
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.show();
|
||||||
})
|
})
|
||||||
|
|
||||||
Window.current.hide();*/
|
Window.current.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(window.status);
|
resolve(window.status);
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import Game from '../Game';
|
|
||||||
import type Launcher from '../Launcher';
|
import type Launcher from '../Launcher';
|
||||||
import Patch from '../Patch';
|
|
||||||
|
|
||||||
import type { LauncherState } from '../types/Launcher';
|
import type { LauncherState } from '../types/Launcher';
|
||||||
|
|
||||||
|
import Window from '../neutralino/Window';
|
||||||
|
|
||||||
|
import Game from '../Game';
|
||||||
|
import Patch from '../Patch';
|
||||||
|
|
||||||
export default class State
|
export default class State
|
||||||
{
|
{
|
||||||
public launcher: Launcher;
|
public launcher: Launcher;
|
||||||
|
@ -32,10 +34,18 @@ export default class State
|
||||||
|
|
||||||
this.launchButton.onclick = () => {
|
this.launchButton.onclick = () => {
|
||||||
if (this.events[this._state])
|
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> => {
|
export default (launcher: Launcher): Promise<void> => {
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
launcher.state!.launchButton!.style['display'] = 'none';
|
||||||
|
|
||||||
Prefix.exists().then((exists) => {
|
Prefix.exists().then((exists) => {
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue