Showing the changes to scripts/system/controllers/controllerModules/tabletStylusInput.js (1 of 7 files). Show all
Unified · Split
| @@ -6,7 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 7 | 7 | |
| 8 | 8 | /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, |
| 9 | − NULL_UUID, enableDispatcherModule, disableDispatcherModule, | |
| 9 | + NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues, | |
| 10 | 10 | Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC, |
| 11 | 11 | AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset |
| 12 | 12 | */ |
| @@ -643,7 +643,11 @@ Script.include("/~/system/libraries/controllers.js"); · 630 unmodified lines | ||
| 643 | 643 | }; |
| 644 | 644 | |
| 645 | 645 | this.isReady = function (controllerData) { |
| 646 | − return this.processStylus(controllerData); | |
| 646 | + if (this.processStylus(controllerData)) { | |
| 647 | + return makeRunningValues(true, [], []); | |
| 648 | + } else { | |
| 649 | + return makeRunningValues(false, [], []); | |
| 650 | + } | |
| 647 | 651 | }; |
| 648 | 652 | |
| 649 | 653 | this.run = function (controllerData, deltaTime) { |
| @@ -660,7 +664,11 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines | ||
| 660 | 664 | if (this.stylusTouchingTarget) { |
| 661 | 665 | this.stylusTouching(controllerData, deltaTime); |
| 662 | 666 | } |
| 663 | − return this.processStylus(controllerData); | |
| 667 | + if (this.processStylus(controllerData)) { | |
| 668 | + return makeRunningValues(true, [], []); | |
| 669 | + } else { | |
| 670 | + return makeRunningValues(false, [], []); | |
| 671 | + } | |
| 664 | 672 | }; |
| 665 | 673 | |
| 666 | 674 | this.cleanup = function () { |
| @@ -674,12 +682,11 @@ Script.include("/~/system/libraries/controllers.js"); · 7 unmodified lines | ||
| 674 | 682 | enableDispatcherModule("LeftTabletStylusInput", leftTabletStylusInput); |
| 675 | 683 | enableDispatcherModule("RightTabletStylusInput", rightTabletStylusInput); |
| 676 | 684 | |
| 677 | − | |
| 678 | 685 | this.cleanup = function () { |
| 679 | − disableDispatcherModule("LeftTabletStylusInput"); | |
| 680 | − disableDispatcherModule("RightTabletStylusInput"); | |
| 681 | 686 | leftTabletStylusInput.cleanup(); |
| 682 | 687 | rightTabletStylusInput.cleanup(); |
| 688 | + disableDispatcherModule("LeftTabletStylusInput"); | |
| 689 | + disableDispatcherModule("RightTabletStylusInput"); | |
| 683 | 690 | }; |
| 684 | 691 | Script.scriptEnding.connect(this.cleanup); |
| 685 | 692 | }()); |