overte/scripts/system/clickToAvatarApp.js
2019-07-22 10:36:57 -07:00

17 lines
555 B
JavaScript

(function () {
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
this.clickDownOnEntity = function (entityID, mouseEvent) {
var scripts = ScriptDiscoveryService.getRunning();
var runningSimplified =
!scripts.every(function (item) {
return item.name !== "simplifiedUI.js";
});
var avatarAppQML = runningSimplified ? "hifi/simplifiedUI/avatarApp/AvatarApp.qml" : "hifi/AvatarApp.qml";
tablet.loadQMLSource(avatarAppQML);
};
}
);