mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
move function out of global scope
This commit is contained in:
parent
2a055429cd
commit
e795af03dd
1 changed files with 19 additions and 21 deletions
|
@ -452,6 +452,25 @@ var toolBar = (function () {
|
|||
}
|
||||
}
|
||||
|
||||
// Handles any edit mode updates required when domains have switched
|
||||
function checkEditPermissionsAndUpdate() {
|
||||
if ((createButton === null) || (createButton === undefined)) {
|
||||
//--EARLY EXIT--( nothing to safely update )
|
||||
return;
|
||||
}
|
||||
|
||||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
||||
createButton.editProperties({
|
||||
icon: (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON),
|
||||
captionColor: (hasRezPermissions ? "#ffffff" : "#888888"),
|
||||
});
|
||||
|
||||
if (!hasRezPermissions && isActive) {
|
||||
that.setActive(false);
|
||||
tablet.gotoHomeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
Script.scriptEnding.connect(cleanup);
|
||||
Window.domainChanged.connect(function () {
|
||||
|
@ -857,27 +876,6 @@ function handleOverlaySelectionToolUpdates(channel, message, sender) {
|
|||
}
|
||||
}
|
||||
|
||||
// Handles any edit mode updates required when domains have switched
|
||||
function checkEditPermissionsAndUpdate() {
|
||||
if ( (createButton === null) || (createButton === undefined) ){
|
||||
//--EARLY EXIT--( nothing to safely update )
|
||||
return;
|
||||
}
|
||||
|
||||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
||||
createButton.editProperties({
|
||||
icon: (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON),
|
||||
captionColor: (hasRezPermissions ? "#ffffff" : "#888888"),
|
||||
});
|
||||
|
||||
if (!hasRezPermissions) {
|
||||
if (isActive) {
|
||||
that.setActive(false);
|
||||
}
|
||||
tablet.gotoHomeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
function handleMessagesReceived(channel, message, sender) {
|
||||
switch( channel ){
|
||||
case 'entityToolUpdates': {
|
||||
|
|
Loading…
Reference in a new issue