Skip to content

Commit

Permalink
Closing right-click menu on mouse down
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Siebeneicker committed Sep 22, 2020
1 parent 1e83ed8 commit 0069164
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DelvEdit/src/com/interrupt/dungeoneer/editor/EditorInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ public boolean touchDown(int x, int y, int pointer, int button) {

ignoreRightClick = false;

Editor.app.ui.touchDown(x, y, pointer, button);

for (InputProcessor listener : listeners) {
boolean results = listener.touchDown(x, y, pointer, button);
if (results) {
Expand Down
6 changes: 6 additions & 0 deletions DelvEdit/src/com/interrupt/dungeoneer/editor/ui/EditorUi.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,4 +611,10 @@ public void touchUp(int x, int y, int pointer, int button) {
}
}
}

public void touchDown(int x, int y, int pointer, int button) {
if (button == Input.Buttons.RIGHT) {
hideContextMenu();
}
}
}

0 comments on commit 0069164

Please sign in to comment.