summaryrefslogtreecommitdiff
path: root/mainWindow.html
blob: 0e54c733a69f09a58bf276f8eff2d019641bbdfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Launcher</title>
  <link rel="stylesheet" href="login.css">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg"
    crossorigin="anonymous">
</head>
<body>
    <div class="controls">
    </div>
    <div class="loginBox">
      <h1>ezLaunch</h1>
      <p>If you are on macOS, make sure you are running the windows version of the game through wine.</p>
      <p>You will need to patch to play updates.</p>
      <div class="activate-button" id="button">
        Play
      </div>
    </div>
    <div class="footer">
      <img src="assets/crystallball2.png" alt="crystall ball">
    </div>

  <script>
    const electron = require('electron');
    const {ipcRenderer} = electron;
    const close = document.getElementById('exit');
    const min = document.getElementById('minimize');
    const playButton = document.getElementById('button');

    ipcRenderer.on('started', function(e) {
      let notif = new Notification('ezLaunch', {
        body: 'Launching Wizard101',
        icon: 'https://i.imgur.com/FQNnvrd.png',
        image: 'https://i.imgur.com/FQNnvrd.png'
      });
    });

    playButton.addEventListener('click', function(e) {
      ipcRenderer.send('game:start');
    });

    document.addEventListener('dragover', event => event.preventDefault())
    document.addEventListener('drop', event => event.preventDefault())
  </script>
</body>
</html>