Merge branch 'master' of https://github.com/highfidelity/hifi into reset-hud-on-driving

This commit is contained in:
howard-stearns 2016-05-20 13:55:06 -07:00
commit 22c8407e4a
2 changed files with 9 additions and 3 deletions

View file

@ -178,7 +178,10 @@ var NON_LINEAR_DIVISOR = 2;
var MINIMUM_SEEK_DISTANCE = 0.01; var MINIMUM_SEEK_DISTANCE = 0.01;
function updateSeeking() { function updateSeeking() {
if (!Reticle.visible || isShakingMouse()) { if (!Reticle.visible || isShakingMouse()) {
isSeeking = true; if (!isSeeking) {
print('Start seeking mouse.');
isSeeking = true;
}
} // e.g., if we're about to turn it on with first movement. } // e.g., if we're about to turn it on with first movement.
if (!isSeeking) { if (!isSeeking) {
return; return;
@ -203,6 +206,7 @@ function updateSeeking() {
} }
var okX = !updateDimension('x'), okY = !updateDimension('y'); // Evaluate both. Don't short-circuit. var okX = !updateDimension('x'), okY = !updateDimension('y'); // Evaluate both. Don't short-circuit.
if (okX && okY) { if (okX && okY) {
print('Finished seeking mouse');
isSeeking = false; isSeeking = false;
} else { } else {
Reticle.setPosition(copy); // Not setReticlePosition Reticle.setPosition(copy); // Not setReticlePosition
@ -444,7 +448,7 @@ function update() {
updateVisualization(controllerPosition, controllerDirection, hudPoint3d, hudPoint2d); updateVisualization(controllerPosition, controllerDirection, hudPoint3d, hudPoint2d);
} }
var UPDATE_INTERVAL = 20; // milliseconds. Script.update is too frequent. var UPDATE_INTERVAL = 50; // milliseconds. Script.update is too frequent.
var updater = Script.setInterval(update, UPDATE_INTERVAL); var updater = Script.setInterval(update, UPDATE_INTERVAL);
Script.scriptEnding.connect(function () { Script.scriptEnding.connect(function () {
Script.clearInterval(updater); Script.clearInterval(updater);

View file

@ -352,7 +352,9 @@ var toolBar = (function() {
gridTool.setVisible(true); gridTool.setVisible(true);
grid.setEnabled(true); grid.setEnabled(true);
propertiesTool.setVisible(true); propertiesTool.setVisible(true);
Window.setFocus(); // Not sure what the following was meant to accomplish, but it currently causes
// everybody else to think that Interface has lost focus overall. fogbugzid:558
// Window.setFocus();
} }
that.showTools(isActive); that.showTools(isActive);
} }