mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-16 01:59:15 +02:00
Use function pointers correctly
This commit is contained in:
parent
c4a4623ba8
commit
b0639be8bd
1 changed files with 10 additions and 6 deletions
|
@ -190,9 +190,7 @@
|
|||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
addOrRemoveButton(false, HMD.active);
|
||||
tablet.screenChanged.connect(onTabletScreenChanged);
|
||||
Window.domainChanged.connect(function () {
|
||||
spectatorCameraOff(true);
|
||||
});
|
||||
Window.domainChanged.connect(onDomainChanged);
|
||||
Window.geometryChanged.connect(resizeViewFinderOverlay);
|
||||
Controller.keyPressEvent.connect(keyPressEvent);
|
||||
HMD.displayModeChanged.connect(onHMDChanged);
|
||||
|
@ -483,9 +481,7 @@
|
|||
// -shutdown() will be called when the script ends (i.e. is stopped).
|
||||
function shutdown() {
|
||||
spectatorCameraOff();
|
||||
Window.domainChanged.disconnect(function () {
|
||||
spectatorCameraOff(true);
|
||||
});
|
||||
Window.domainChanged.disconnect(onDomainChanged);
|
||||
Window.geometryChanged.disconnect(resizeViewFinderOverlay);
|
||||
addOrRemoveButton(true, HMD.active);
|
||||
if (tablet) {
|
||||
|
@ -501,6 +497,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Function Name: onDomainChanged()
|
||||
//
|
||||
// Description:
|
||||
// -A small utility function used when the Window.domainChanged() signal is fired.
|
||||
function onDomainChanged() {
|
||||
spectatorCameraOff(true);
|
||||
}
|
||||
|
||||
// These functions will be called when the script is loaded.
|
||||
startup();
|
||||
Script.scriptEnding.connect(shutdown);
|
||||
|
|
Loading…
Reference in a new issue