-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-menu.html
106 lines (93 loc) · 3.52 KB
/
main-menu.html
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!--
Group:........ That Helvetica Group
Members:...... Scott McKay, Kendyl Freeny, William Cook
Institution:.. University of Montana
Class:........ Advanced Web-design & Programming
Date:......... Friday, October 12th, 2018
-->
<!DOCTYPE html>
<html id="html">
<head id="mainMenuHead">
<link rel="stylesheet" type="text/css" href="assets/css/main-menu-desktop.css">
<link rel="stylesheet" type="text/css" href="assets/css/settings-desktop.css">
<link rel="stylesheet" type="text/css" href="assets/css/highscores-desktop.css">
<meta charset="utf8"/>
<title>Pacman-Esque: Main Menu</title>
</head>
<!-- Used by "Animated Menu Buttons" and "Animated Background Particles" -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<body>
<canvas class="Canvas" id="canvas"></canvas>
<!-- Main Menu -->
<div class="Menu-Container" id="menuContainer">
<div class="Animated-Logo-Container --faded-in" id="animatedLogoContainer">
<!-- Menu Logo -->
<img src="./assets/images/pacman-esque/new_piskel.png" id="animatedLogo" alt="Could not load logo">
</div>
<!-- Menu Options -->
<div class="Menu-Options --visible" id="menuOptions">
<a class="Button" onclick="window.location.href = 'game-page.html'">Start Game</a>
<p class="Spacing"> </p>
<a href="highscores.html" class="Button">Highscores</a>
<p class="Spacing"> </p>
<a href="settings.html" class="Button">Settings</a>
<p class="Spacing"> </p>
<a href="about.html" id="lastButton" class="Button">About</a>
</div>
</div>
<script src="assets/script/pacman-esque/jquery.smoothState.min.js"></script>
<script src="assets/script/pacman-esque/main-menu-transitions.js"></script>
</body>
<!-- Draggable Menu-Container -->
<script>
draggableElement(document.getElementById("menuContainer"));
function draggableElement(element)
{
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
if (document.getElementById(element + "header"))
{
//If present, the header is where you moe the DIV from.
document.getElementById(element.id + "header").onmousedown = dragMouseDown;
}
else
{
//Otherwise, move the DIV from anywhere inside DIV
element.onmousedown = dragMouseDown;
}
function dragMouseDown(e)
{
e = e || window.event;
e.preventDefault();
//Get the mouse cursor position at start-up:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
//Call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e)
{
e = e || window.event;
e.preventDefault();
//Calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
//Set the element's new position:
element.style.top = (element.offsetTop - pos2) + "px";
element.style.left = (element.offsetLeft - pos1) + "px";
}
function closeDragElement()
{
//Stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
}
</script>
<!-- /Draggable Menu-Container/ -->
<!-- Animated Background Particles -->
<script src="assets/script/pacman-esque/menu-desktop-background.js"></script>
<!-- /Animated Background Particles/ -->
</html>