History

get ready for highlighting

Seth Alves committed 9 years ago

Commit 327bc231 parent e7437d67 files · +250 −141Browse files

Showing the changes to scripts/system/controllers/controllerModules/tabletStylusInput.js (1 of 7 files). Show all

Unified · Split

scripts/system/controllers/controllerModules/tabletStylusInput.js+13−6
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88 /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
9− NULL_UUID, enableDispatcherModule, disableDispatcherModule,
9+ NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
1010 Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
1111 AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset
1212 */
@@ -643,7 +643,11 @@ Script.include("/~/system/libraries/controllers.js"); · 630 unmodified lines
643643 };
644644
645645 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+ }
647651 };
648652
649653 this.run = function (controllerData, deltaTime) {
@@ -660,7 +664,11 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines
660664 if (this.stylusTouchingTarget) {
661665 this.stylusTouching(controllerData, deltaTime);
662666 }
663− return this.processStylus(controllerData);
667+ if (this.processStylus(controllerData)) {
668+ return makeRunningValues(true, [], []);
669+ } else {
670+ return makeRunningValues(false, [], []);
671+ }
664672 };
665673
666674 this.cleanup = function () {
@@ -674,12 +682,11 @@ Script.include("/~/system/libraries/controllers.js"); · 7 unmodified lines
674682 enableDispatcherModule("LeftTabletStylusInput", leftTabletStylusInput);
675683 enableDispatcherModule("RightTabletStylusInput", rightTabletStylusInput);
676684
677−
678685 this.cleanup = function () {
679− disableDispatcherModule("LeftTabletStylusInput");
680− disableDispatcherModule("RightTabletStylusInput");
681686 leftTabletStylusInput.cleanup();
682687 rightTabletStylusInput.cleanup();
688+ disableDispatcherModule("LeftTabletStylusInput");
689+ disableDispatcherModule("RightTabletStylusInput");
683690 };
684691 Script.scriptEnding.connect(this.cleanup);
685692 }());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t