Skip to content

Commit

Permalink
web client: listen for double-click events on minimap...
Browse files Browse the repository at this point in the history
Related issues:
- #298
- #254
  • Loading branch information
AntumDeluge committed Dec 24, 2019
1 parent 1671f95 commit b9888f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions srcjs/stendhal/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ stendhal.main = {

var minimap = document.getElementById("minimap");
minimap.addEventListener("click", stendhal.ui.minimap.onClick);
minimap.addEventListener("dblclick", stendhal.ui.minimap.onClick);

var buddyList = document.getElementById("buddyList");
buddyList.addEventListener("mouseup", stendhal.ui.buddyList.onMouseUp);
Expand Down
5 changes: 5 additions & 0 deletions srcjs/stendhal/ui/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ stendhal.ui.minimap = {
x: x.toString(),
y: y.toString()
};

if ("type" in e && e["type"] === "dblclick") {
action["double_click"] = "";
}

marauroa.clientFramework.sendAction(action);
}
}
Expand Down

0 comments on commit b9888f2

Please sign in to comment.