mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-11 06:42:13 +02:00
Make 3D "x" button work
This commit is contained in:
parent
ef7ea0eaa6
commit
7d1cc1f20d
1 changed files with 9 additions and 3 deletions
|
@ -495,12 +495,18 @@ function onMuteStateChanged() {
|
|||
|
||||
// handles mouse clicks on buttons
|
||||
function mousePressEvent(event) {
|
||||
var clickedOverlay,
|
||||
var pickRay,
|
||||
clickedOverlay,
|
||||
i;
|
||||
|
||||
clickedOverlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y }); //identify which overlay was clicked
|
||||
if (isOnHMD) {
|
||||
pickRay = Camera.computePickRay(event.x, event.y);
|
||||
clickedOverlay = Overlays.findRayIntersection(pickRay).overlayID;
|
||||
} else {
|
||||
clickedOverlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });
|
||||
}
|
||||
|
||||
for (i = 0; i < buttons.length; i += 1) { //if user clicked a button
|
||||
for (i = 0; i < buttons.length; i += 1) {
|
||||
if (clickedOverlay === buttons[i]) {
|
||||
deleteNotification(i);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue