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();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,11 +5,26 @@
|
|||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
<script type = text/javascript>
|
||||
window.addEventListener("load", function() {
|
||||
window.classicConfig = ["game","resources.mc"];
|
||||
main();
|
||||
});
|
||||
</script>
|
||||
window.addEventListener("load", function() {
|
||||
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">
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue
Block a user