Skip to content

Commit

Permalink
Add secondary touch support to main quick menu button
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Mar 2, 2024
1 parent 24c7aef commit a310578
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions srcjs/stendhal/ui/quickmenu/QuickMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { ui } from "../UI";

import { Paths } from "../../data/Paths";

import { ElementClickHandler } from "../../util/ElementClickHandler";


/**
* Main button to show/hide quick menu buttons.
Expand Down Expand Up @@ -87,9 +89,9 @@ export class QuickMenu {
}
btn_main.src = Paths.gui + "/quickmenu/main.png";

btn_main.addEventListener("click", function(e) {
new ElementClickHandler(btn_main).onClick = function(evt: Event) {
QuickMenu.toggle();
});
};

// hide buttons by default
QuickMenu.update();
Expand Down

0 comments on commit a310578

Please sign in to comment.