Forgot to add some code -_-
This commit is contained in:
parent
58eb41c1d8
commit
53566d9ad0
|
@ -8,6 +8,21 @@ window.addEventListener("load", function() {
|
|||
"game_frame",createAssetURI("assets"),
|
||||
]; main();
|
||||
});
|
||||
|
||||
document.esc = false;
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
e.preventDefault();
|
||||
document.esc = true;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
e.preventDefault();
|
||||
document.esc = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -1846,9 +1846,6 @@ public class EaglerAdapterImpl2 {
|
|||
}
|
||||
|
||||
public static boolean escapeKeyPressed() {
|
||||
if(escapeKeyPressed2()) {
|
||||
System.out.println("Escape Key Pressed!");
|
||||
}
|
||||
return getEventKey() == 1 || escapeKeyPressed2();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,21 @@
|
|||
window.classicConfig = ["game","resources.mc"];
|
||||
main();
|
||||
});
|
||||
|
||||
document.esc = false;
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
e.preventDefault();
|
||||
document.esc = true;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
e.preventDefault();
|
||||
document.esc = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;" id="game">
|
||||
|
|
Loading…
Reference in New Issue
Block a user