launch game with official button

This commit is contained in:
SpikeHD 2022-04-19 18:21:29 -07:00
parent 6e73fb0bbf
commit 77fbee5fbf
4 changed files with 11 additions and 5 deletions

View File

@ -1 +1 @@
{"accessToken":"PhF6gNpYzbtGBwyxQLGAFObt441zQ4uuGjO8L4ZsR02QjIty","port":51786}
{"accessToken":"ToV6wKKVBBrgS1L3fMacE3Am--oguUf3t0dTffiCZjFQJFJE","port":52555}

View File

@ -8,7 +8,7 @@
<body>
<div id="halvesContainer">
<div id="firstHalf">
<button class="playBtn">Play Official</button>
<button class="playBtn" onclick="launchOfficial()">Play Official</button>
</div>
<div id="secondHalf">
<button class="playBtn">Play Private</button>

View File

@ -53,3 +53,9 @@ async function setGenshinImpactFolder() {
config.genshinImpactFolder = folder
Neutralino.storage.setData('config', JSON.stringify(config))
}
async function launchOfficial() {
const config = await getCfg()
Neutralino.os.execCommand(config.genshinImpactFolder + '/Genshin Impact Game/GenshinImpact.exe')
}

View File

@ -76,7 +76,7 @@ body {
/* Move the button to the position on the png */
#firstHalf button {
position: relative;
transform: translate(130px, 500px);
width: 400px;
height: 70px;
transform: translate(115px, 480px);
width: 300px;
height: 60px;
}