mirror of
https://github.com/danbulant/arcade-machine
synced 2026-05-19 04:18:51 +00:00
126 lines
No EOL
3.9 KiB
HTML
126 lines
No EOL
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="style.css">
|
|
<title>UI</title>
|
|
</head>
|
|
<body>
|
|
<script src ="Vars.js">
|
|
</script> <!--Loadne Vars.js-->
|
|
<div class="hlavnidiv">
|
|
<div class="container">
|
|
<button class="move" type="button" id="sdvx3-button" onclick="vers=3;sdvx()">
|
|
<img src="JPGS/sound-voltex-iii-gravity-wars-1.png" alt="">
|
|
<h1 class="sex">Sound Voltex III: Gravity Wars</h1>
|
|
</button> <!--SDVX3-->
|
|
<button class="move" type="button" id="sdvx4-button" onclick="vers=4;sdvx()">
|
|
<img src="JPGS/maxresdefault3.jpg" alt="">
|
|
<h1 class="sex">SDVX4</h1>
|
|
</button> <!--SDVX4-->
|
|
<button class="move" type="button" id="sdvx5-button" onclick="vers=5;sdvx()">
|
|
<img src="JPGS/SDVX5scaled.jpg" alt="">
|
|
<h1 class="sex">SDVX5</h1>
|
|
</button>
|
|
<button class="move" type="button" id="sdvx6-button" onclick="vers=5;sdvx()">
|
|
<img src="" alt="">
|
|
<h1 class="sex">SDVX6</h1>
|
|
</button> <!--SDVX5-->
|
|
<button class="move" type="button" id="sdvx7-button" onclick="vers=5;sdvx()">
|
|
<img src="" alt="">
|
|
<h1 class="sex">GAME1</h1>
|
|
</button> <!--SDVX5-->
|
|
<button class="move" type="button" id="sdvx6-button" onclick="vers=5;sdvx()">
|
|
<img src="" alt="">
|
|
<h1 class="sex">GAME2</h1>
|
|
</button> <!--SDVX5-->
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
const prvnihra = [...document.querySelectorAll("button")]
|
|
// for (i = 0; i < prvnihra.length; i++) {
|
|
//console.log(prvnihra[i]);
|
|
//}
|
|
console.log(prvnihra[0])
|
|
prvnihra[0].focus();
|
|
</script>
|
|
<script>
|
|
var i = 0;
|
|
document.addEventListener("keydown",function(sex2){
|
|
if (sex2.code === "KeyD"){
|
|
if(i>=prvnihra.length - 1) i = -1;
|
|
i++;
|
|
prvnihra[i].focus();
|
|
console.log("right", i);
|
|
console.log("array je", prvnihra.length);
|
|
}
|
|
|
|
})
|
|
document.addEventListener("keydown",function(sex3){
|
|
if(sex3.code === "KeyA"){
|
|
if(i<=0) i=prvnihra.length
|
|
i--;
|
|
prvnihra[i].focus()
|
|
console.log("left", i);
|
|
}
|
|
if (sex3.code === "KeyE"){
|
|
console.log(document.activeElement);
|
|
document.activeElement.click();
|
|
}
|
|
if(sex3.code === "KeyS" && i+3 < prvnihra.length){
|
|
console.log(i);
|
|
i = i+3;
|
|
prvnihra[i].focus();
|
|
}
|
|
if(sex3.code === "KeyW" && i-3 >= 0){
|
|
console.log(i);
|
|
i = i-3;
|
|
prvnihra[i].focus();
|
|
}
|
|
document.body.requestFullscreen();
|
|
})
|
|
|
|
</script>
|
|
<script>
|
|
var vers = 0;
|
|
const { execFile, exec } = require('child_process');
|
|
function sdvx(){
|
|
console.log("promenna",vers);
|
|
switch (vers) {
|
|
case 3:
|
|
|
|
execFile(AsphyxiaPath);
|
|
execFile(SDVX3Path);
|
|
setTimeout(function(){
|
|
exec("taskkill /im " + browser)
|
|
},1200)
|
|
//console.log(vers);
|
|
break;
|
|
case 4:
|
|
execFile(AsphyxiaPath);
|
|
execFile(SDVX4Path);
|
|
setTimeout(function(){
|
|
exec("taskkill /im " + browser)
|
|
},1200)
|
|
break;
|
|
case 5:
|
|
execFile(AsphyxiaPath);
|
|
execFile(SDVX5Path);
|
|
setTimeout(function(){
|
|
exec("taskkill /im " + browser)
|
|
},1200)
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |