mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 08:11:59 +02:00
Improved support for button rollover and hover
Send a combination of mouse and touch events to the web browser entity. * MouseMove events for when the trigger is not depressed. This will trigger mouse over and hover events within the browser * Touch Begin, End, Update events when the trigger is squeezed. This will give us the iPad like scrolling behavior.
This commit is contained in:
parent
90a06f0d40
commit
1dd276c1a5
1 changed files with 7 additions and 1 deletions
|
@ -1314,7 +1314,13 @@ function MyController(hand) {
|
|||
Reticle.keyboardFocusEntity = focusedEntity;
|
||||
}
|
||||
|
||||
Reticle.sendEntityTouchUpdateEvent(focusedEntity, this.hand, intersectionPoint);
|
||||
if (!this.triggerSmoothedGrab()) {
|
||||
// send mouse events for button highlights and tooltips
|
||||
Reticle.sendEntityMouseMoveEvent(focusedEntity, intersectionPoint);
|
||||
} else {
|
||||
// but send touch updates when grab is pressed.
|
||||
Reticle.sendEntityTouchUpdateEvent(focusedEntity, this.hand, intersectionPoint);
|
||||
}
|
||||
|
||||
if (this.triggerSmoothedGrab() && !this.lastTriggerSmoothedGrab) {
|
||||
Reticle.sendEntityTouchBeginEvent(focusedEntity, this.hand, intersectionPoint);
|
||||
|
|
Loading…
Reference in a new issue