mirror of
https://github.com/danbulant/arcade-machine
synced 2026-07-10 13:31:09 +00:00
Added check for button combo (will exit app in future)
This commit is contained in:
parent
9412091524
commit
d6154ad3f5
1 changed files with 106 additions and 94 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
|
@ -7,10 +8,11 @@
|
|||
<link rel="stylesheet" href="style.css">
|
||||
<title>UI</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src ="Vars.js">
|
||||
</script> <!--Loadne Vars.js-->
|
||||
<div class="hlavnidiv">
|
||||
<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="">
|
||||
|
|
@ -39,26 +41,19 @@
|
|||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <audio id="Switchfocus">
|
||||
<source src="Audio/switchfocus.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
<audio id="Audiostart">
|
||||
<source src="Audio/audiostart.mp3" type="audio/mpeg">
|
||||
</audio> -->
|
||||
|
||||
<script>
|
||||
<script>
|
||||
|
||||
const prvnihra = [...document.querySelectorAll("button")]
|
||||
// for (i = 0; i < prvnihra.length; i++) {
|
||||
//console.log(prvnihra[i]);
|
||||
//}
|
||||
//}
|
||||
console.log(prvnihra[0])
|
||||
prvnihra[0].focus(); /* Handles interaction with bindable buttons and focus*/
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
/**/
|
||||
var i = 0;
|
||||
const switchfocus = new Audio("Audio/switchfocus.mp3");
|
||||
|
|
@ -102,8 +97,25 @@
|
|||
//document.body.requestFullscreen();
|
||||
})
|
||||
|
||||
</script>
|
||||
<script>
|
||||
let keysPressed = {};
|
||||
document.addEventListener('keydown', (event) => {
|
||||
keysPressed[event.key] = true;
|
||||
|
||||
if (keysPressed[ExitKey1] && event.key == ExitKey2) {
|
||||
alert(event.key);
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keyup', (event) => {
|
||||
delete keysPressed[event.key];
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var vers = 0; /* Handles Running of apps */
|
||||
const { execFile, exec, spawn } = require('child_process');
|
||||
function sdvx() {
|
||||
|
|
@ -137,8 +149,8 @@
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in a new issue