Skip to content

Commit 4edaaf6

Browse files

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

index.html

+34-10
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,35 @@
88
<link rel="icon" type="image/x-icon" href="Game.ico">
99

1010
<!-- Load custom style sheet -->
11-
<link rel="stylesheet" type="text/css" href="theme/love.css">
11+
<style>
12+
body {
13+
background-repeat: no-repeat;
14+
font-family: arial;
15+
margin: 0;
16+
padding: none;
17+
background-color: rgb( 154, 205, 237 );
18+
color: rgb( 28, 78, 104 );
19+
}
20+
21+
button {
22+
font-size: 20px
23+
}
24+
25+
footer {
26+
font-family: arial;
27+
font-size: 12px;
28+
padding-left: 10px;
29+
position:absolute;
30+
bottom: 0;
31+
width: 100%;
32+
}
33+
</style>
1234
</head>
1335
<body>
1436
<center>
1537
<div>
16-
<canvas id="loadingCanvas" oncontextmenu="event.preventDefault()" width="1920" height="1080"></canvas>
17-
<canvas id="canvas" oncontextmenu="event.preventDefault()" width="1920" height="1080"></canvas>
38+
<canvas id="canvas" style="visibility: hidden; position: absolute; width: 100%; height: 100%; display: block;" oncontextmenu="event.preventDefault()"></canvas>
39+
<canvas id="loadingCanvas" style="position: absolute; width: 100%; height: 100%; display: block;" oncontextmenu="event.preventDefault()"></canvas>
1840
</div>
1941
</center>
2042

@@ -28,14 +50,16 @@
2850
else if(canvas.mozRequestFullScreen)
2951
canvas.mozRequestFullScreen();
3052
}
31-
function FullScreenHook(){
32-
var canvas = document.getElementById("canvas");
33-
canvas.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
34-
canvas.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
35-
}
53+
// function FullScreenHook(){
54+
// var canvas = document.getElementById("canvas");
55+
// canvas.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
56+
// canvas.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
57+
// }
3658
var loadingContext = document.getElementById('loadingCanvas').getContext('2d');
3759
function drawLoadingText(text) {
3860
var canvas = loadingContext.canvas;
61+
canvas.width = window.innerWidth;
62+
canvas.height = window.innerHeight;
3963

4064
loadingContext.fillStyle = "rgb(142, 195, 227)";
4165
loadingContext.fillRect(0, 0, canvas.scrollWidth, canvas.scrollHeight);
@@ -104,8 +128,8 @@
104128
</script>
105129
<script type="text/javascript" src="game.js"></script>
106130
<script async type="text/javascript" src="love.js" onload="applicationLoad(this)"></script>
107-
<footer>
131+
<!-- <footer>
108132
<p><button onclick="goFullScreen();">Go Fullscreen</button></p>
109-
</footer>
133+
</footer> -->
110134
</body>
111135
</html>

theme/bg.png

-6.99 KB
Binary file not shown.

theme/love.css

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
2-
background-image: url(bg.png);
2+
/* background-image: url(bg.png); */
33
background-repeat: no-repeat;
44
font-family: arial;
55
margin: 0;
@@ -19,26 +19,4 @@ footer {
1919
position:absolute;
2020
bottom: 0;
2121
width: 100%;
22-
}
23-
24-
/* Links */
25-
a {
26-
text-decoration: none;
27-
}
28-
a:link {
29-
color: rgb( 233, 73, 154 );
30-
}
31-
a:visited {
32-
color: rgb( 110, 30, 71 );
33-
}
34-
a:hover {
35-
color: rgb( 252, 207, 230 );
36-
}
37-
38-
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
39-
#canvas {
40-
padding: 0;
41-
display: inline;
42-
border: 0px;
43-
visibility: hidden;
44-
}
22+
}

0 commit comments

Comments
 (0)