mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 21:03:17 +02:00
unmangle merge
This commit is contained in:
parent
e96b646f66
commit
2d220a557f
2 changed files with 1 additions and 58 deletions
|
@ -95,7 +95,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly) {
|
||||||
this.cleanUpOldTablets();
|
this.cleanUpOldTablets();
|
||||||
this.tabletEntityID = Entities.addEntity(tabletProperties, clientOnly);
|
this.tabletEntityID = Entities.addEntity(tabletProperties, clientOnly);
|
||||||
|
|
||||||
var WEB_ENTITY_Z_OFFSET = -0.0125;
|
var WEB_ENTITY_Z_OFFSET = -0.013;
|
||||||
if (this.webOverlayID) {
|
if (this.webOverlayID) {
|
||||||
Overlays.deleteOverlay(this.webOverlayID);
|
Overlays.deleteOverlay(this.webOverlayID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -589,63 +589,6 @@ function createAudioInterval() {
|
||||||
}, AUDIO_LEVEL_UPDATE_INTERVAL_MS);
|
}, AUDIO_LEVEL_UPDATE_INTERVAL_MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Manage the connection between the button and the window.
|
|
||||||
//
|
|
||||||
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
|
||||||
var buttonName = "pal";
|
|
||||||
var button = toolBar.addButton({
|
|
||||||
objectName: buttonName,
|
|
||||||
imageURL: Script.resolvePath("assets/images/tools/people.svg"),
|
|
||||||
visible: true,
|
|
||||||
hoverState: 2,
|
|
||||||
defaultState: 1,
|
|
||||||
buttonState: 1,
|
|
||||||
alpha: 0.9
|
|
||||||
});
|
|
||||||
|
|
||||||
var isWired = false;
|
|
||||||
var palOpenedAt;
|
|
||||||
|
|
||||||
function off() {
|
|
||||||
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
|
||||||
Script.update.disconnect(updateOverlays);
|
|
||||||
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
|
||||||
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
|
||||||
isWired = false;
|
|
||||||
}
|
|
||||||
triggerMapping.disable(); // It's ok if we disable twice.
|
|
||||||
triggerPressMapping.disable(); // see above
|
|
||||||
removeOverlays();
|
|
||||||
Users.requestsDomainListData = false;
|
|
||||||
if (palOpenedAt) {
|
|
||||||
var duration = new Date().getTime() - palOpenedAt;
|
|
||||||
UserActivityLogger.palOpened(duration / 1000.0);
|
|
||||||
palOpenedAt = 0; // just a falsy number is good enough.
|
|
||||||
}
|
|
||||||
if (audioInterval) {
|
|
||||||
Script.clearInterval(audioInterval);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function onClicked() {
|
|
||||||
if (!pal.visible) {
|
|
||||||
Users.requestsDomainListData = true;
|
|
||||||
populateUserList();
|
|
||||||
pal.raise();
|
|
||||||
isWired = true;
|
|
||||||
Script.update.connect(updateOverlays);
|
|
||||||
Controller.mousePressEvent.connect(handleMouseEvent);
|
|
||||||
Controller.mouseMoveEvent.connect(handleMouseMoveEvent);
|
|
||||||
triggerMapping.enable();
|
|
||||||
triggerPressMapping.enable();
|
|
||||||
createAudioInterval();
|
|
||||||
palOpenedAt = new Date().getTime();
|
|
||||||
} else {
|
|
||||||
off();
|
|
||||||
}
|
|
||||||
pal.setVisible(!pal.visible);
|
|
||||||
}
|
|
||||||
|
|
||||||
function avatarDisconnected(nodeID) {
|
function avatarDisconnected(nodeID) {
|
||||||
// remove from the pal list
|
// remove from the pal list
|
||||||
pal.sendToQml({method: 'avatarDisconnected', params: [nodeID]});
|
pal.sendToQml({method: 'avatarDisconnected', params: [nodeID]});
|
||||||
|
|
Loading…
Reference in a new issue