Skip to content

Commit

Permalink
[gamepad] added left menu button to open/hide drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
Grovkillen committed Mar 25, 2020
1 parent c17aaf6 commit 25672fc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/gui_easy_popper.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,27 @@ guiEasy.popper.gamepad.eventListener = function (gamepadMap) {
let eventDetails = {
"type": args[0],
"args": args,
"dataset": x,
"dataset": element,
"x": element.x,
"y": element.y,
"element": element
};
helpEasy.addToLogDOM("Calling click event: " + JSON.stringify(eventDetails), 2);
guiEasy.popper.tryCallEvent(eventDetails);
}
if (gamepadMap.menu.left === 1) {
// call an event using event details + try call
if (x["menu.left.wait"]) {
return;
} else {
x.eventDelayer("menu.left");
}
let element = document.getElementsByClassName("bottom-tab")[0];
let args = element.dataset["click"].split("-");
let eventDetails = {
"type": args[0],
"args": args,
"dataset": element,
"x": element.x,
"y": element.y,
"element": element
Expand Down

0 comments on commit 25672fc

Please sign in to comment.