mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:03:58 +02:00
handle click event on overlays only when in ignore mode
This commit is contained in:
parent
946c7d4644
commit
aa433e7233
1 changed files with 13 additions and 11 deletions
|
@ -134,6 +134,7 @@ function handleSelectedOverlay(clickedOverlay) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.mousePressEvent.connect(function(event){
|
Controller.mousePressEvent.connect(function(event){
|
||||||
|
if (isShowingOverlays) {
|
||||||
// handle click events so we can detect when our overlays are clicked
|
// handle click events so we can detect when our overlays are clicked
|
||||||
|
|
||||||
if (!event.isLeftButton) {
|
if (!event.isLeftButton) {
|
||||||
|
@ -149,6 +150,7 @@ Controller.mousePressEvent.connect(function(event){
|
||||||
if (clickedOverlay.intersects) {
|
if (clickedOverlay.intersects) {
|
||||||
handleSelectedOverlay(clickedOverlay);
|
handleSelectedOverlay(clickedOverlay);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// We get mouseMoveEvents from the handControllers, via handControllerPointer.
|
// We get mouseMoveEvents from the handControllers, via handControllerPointer.
|
||||||
|
|
Loading…
Reference in a new issue