mirror of
https://github.com/FlamedDogo99/EaglerMobile.git
synced 2024-11-09 05:56:04 -08:00
Changed shift key test
This commit is contained in:
parent
1a914493ab
commit
43c2b5601e
|
@ -442,10 +442,13 @@ function insertCanvasElements() {
|
||||||
let inventoryButton = createTouchButton("inventoryButton", "inGame");
|
let inventoryButton = createTouchButton("inventoryButton", "inGame");
|
||||||
inventoryButton.style.cssText = "right:0vh;bottom:30vh;"
|
inventoryButton.style.cssText = "right:0vh;bottom:30vh;"
|
||||||
inventoryButton.addEventListener("touchstart", function(e) {
|
inventoryButton.addEventListener("touchstart", function(e) {
|
||||||
keyEvent("shift", "keyup"); // Sometimes shift gets stuck on, which interferes with item manipulation in GUI's
|
|
||||||
keyEvent("e", "keydown");
|
keyEvent("e", "keydown");
|
||||||
}, false);
|
}, false);
|
||||||
inventoryButton.addEventListener("touchend", function(e){keyEvent("e", "keyup")}, false);
|
inventoryButton.addEventListener("touchend", function(e){
|
||||||
|
keyEvent("shift", "keydown"); // Sometimes shift gets stuck on, which interferes with item manipulation in GUI's
|
||||||
|
keyEvent("shift", "keyup"); // Sometimes shift gets stuck on, which interferes with item manipulation in GUI's
|
||||||
|
keyEvent("e", "keyup");
|
||||||
|
}, false);
|
||||||
document.body.appendChild(inventoryButton);
|
document.body.appendChild(inventoryButton);
|
||||||
let exitButton = createTouchButton("exitButton", "inMenu");
|
let exitButton = createTouchButton("exitButton", "inMenu");
|
||||||
exitButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right:8vh; width: 8vh; height: 8vh;"
|
exitButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right:8vh; width: 8vh; height: 8vh;"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user