This commit is contained in:
nemo 2024-11-15 12:47:56 +01:00
parent 4e972cac7e
commit aa565d98a6
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@
width: 64px; width: 64px;
image-rendering: pixelated; image-rendering: pixelated;
} }
@media screen and (min-width: 1620px) { @media screen and (min-width: calc(800px + calc(64px * 4))) {
body { body {
content: ""; content: "";
display: table; display: table;
@ -22,7 +22,10 @@
} }
#right { #right {
float: right; float: right;
width: 50%; width: calc(100% - 800px - 25px);
position: absolute;
top: 0px;
right: 0px;
} }
} }
</style> </style>

View File

@ -115,6 +115,9 @@ window.requestAnimationFrame(first);
addEventListener('keydown', (e) => { addEventListener('keydown', (e) => {
wasm_function('key_pressed')(e.keyCode); wasm_function('key_pressed')(e.keyCode);
if(["Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(e.code) > -1) {
e.preventDefault();
}
}); });
addEventListener('keyup', (e) => { addEventListener('keyup', (e) => {