mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
don't run stylus-on-overlay code unless the overlay is a web3d overlay
This commit is contained in:
parent
27066e89a6
commit
4886f1cbfc
2 changed files with 7 additions and 1 deletions
|
@ -100,6 +100,9 @@ void Overlay::setProperties(const QVariantMap& properties) {
|
|||
}
|
||||
|
||||
QVariant Overlay::getProperty(const QString& property) {
|
||||
if (property == "type") {
|
||||
return QVariant(getType());
|
||||
}
|
||||
if (property == "color") {
|
||||
return xColorToVariant(_color);
|
||||
}
|
||||
|
|
|
@ -2031,6 +2031,9 @@ function MyController(hand) {
|
|||
var pointerEvent;
|
||||
if (rayPickInfo.overlayID) {
|
||||
var overlay = rayPickInfo.overlayID;
|
||||
if (Overlays.getProperty(overlay, "type") != "web3d") {
|
||||
return false;
|
||||
}
|
||||
if (Overlays.keyboardFocusOverlay != overlay) {
|
||||
Entities.keyboardFocusEntity = null;
|
||||
Overlays.keyboardFocusOverlay = overlay;
|
||||
|
@ -3388,7 +3391,7 @@ function MyController(hand) {
|
|||
|
||||
if (this.state == STATE_OVERLAY_STYLUS_TOUCHING && intersectInfo.distance > max) {
|
||||
this.grabbedThingID = null;
|
||||
this.setState(STATE_OFF, "pulled away from overlay");
|
||||
this.setState(STATE_OFF, "pulled away from overlay -- " + intersectInfo.distance + " max = " + max);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue