mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:07:22 +02:00
diff minimize
This commit is contained in:
parent
cad9f66572
commit
bf6178f500
4 changed files with 8 additions and 13 deletions
|
@ -41,7 +41,7 @@ function calcSpawnInfo() {
|
||||||
|
|
||||||
// ctor
|
// ctor
|
||||||
WebTablet = function (url, width, dpi, location, clientOnly) {
|
WebTablet = function (url, width, dpi, location, clientOnly) {
|
||||||
print(url);
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var ASPECT = 4.0 / 3.0;
|
var ASPECT = 4.0 / 3.0;
|
||||||
var WIDTH = width || DEFAULT_WIDTH;
|
var WIDTH = width || DEFAULT_WIDTH;
|
||||||
|
@ -54,7 +54,7 @@ WebTablet = function (url, width, dpi, location, clientOnly) {
|
||||||
var spawnInfo = calcSpawnInfo();
|
var spawnInfo = calcSpawnInfo();
|
||||||
var tabletEntityPosition = spawnInfo.position;
|
var tabletEntityPosition = spawnInfo.position;
|
||||||
var tabletEntityRotation = spawnInfo.rotation;
|
var tabletEntityRotation = spawnInfo.rotation;
|
||||||
|
|
||||||
var tabletProperties = {
|
var tabletProperties = {
|
||||||
name: "WebTablet Tablet",
|
name: "WebTablet Tablet",
|
||||||
type: "Model",
|
type: "Model",
|
||||||
|
@ -75,7 +75,7 @@ WebTablet = function (url, width, dpi, location, clientOnly) {
|
||||||
tabletProperties.position = spawnInfo.position;
|
tabletProperties.position = spawnInfo.position;
|
||||||
tabletProperties.rotation = spawnInfo.rotation;
|
tabletProperties.rotation = spawnInfo.rotation;
|
||||||
}
|
}
|
||||||
this.tabletURL = url;
|
|
||||||
this.tabletEntityID = Entities.addEntity(tabletProperties, clientOnly);
|
this.tabletEntityID = Entities.addEntity(tabletProperties, clientOnly);
|
||||||
|
|
||||||
var WEB_ENTITY_Z_OFFSET = -0.01;
|
var WEB_ENTITY_Z_OFFSET = -0.01;
|
||||||
|
|
|
@ -62,15 +62,14 @@ function hideTablet(tablet) {
|
||||||
Settings.setValue(persistenceKey, "");
|
Settings.setValue(persistenceKey, "");
|
||||||
}
|
}
|
||||||
function clearOldTablet() { // If there was a tablet from previous domain or session, kill it and let it be recreated
|
function clearOldTablet() { // If there was a tablet from previous domain or session, kill it and let it be recreated
|
||||||
//var tablet = WebTablet.unpickle(Settings.getValue(persistenceKey, ""));
|
|
||||||
//hideTablet(tablet);
|
|
||||||
}
|
}
|
||||||
function hideMarketplace() {
|
function hideMarketplace() {
|
||||||
if (marketplaceWindow.visible) {
|
if (marketplaceWindow.visible) {
|
||||||
marketplaceWindow.setVisible(false);
|
marketplaceWindow.setVisible(false);
|
||||||
marketplaceWindow.setURL("about:blank");
|
marketplaceWindow.setURL("about:blank");
|
||||||
} else if (marketplaceWebTablet) {
|
} else if (marketplaceWebTablet) {
|
||||||
//hideTablet(marketplaceWebTablet);
|
|
||||||
}
|
}
|
||||||
marketplaceVisible = false;
|
marketplaceVisible = false;
|
||||||
}
|
}
|
||||||
|
@ -91,9 +90,7 @@ var browseExamplesButton = tablet.addButton({
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateButtonState(visible) {
|
function updateButtonState(visible) {
|
||||||
//browseExamplesButton.writeProperty('buttonState', visible ? 0 : 1);
|
|
||||||
//browseExamplesButton.writeProperty('defaultState', visible ? 0 : 1);
|
|
||||||
//browseExamplesButton.writeProperty('hoverState', visible ? 2 : 3);
|
|
||||||
}
|
}
|
||||||
function onMarketplaceWindowVisibilityChanged() {
|
function onMarketplaceWindowVisibilityChanged() {
|
||||||
updateButtonState(marketplaceWindow.visible);
|
updateButtonState(marketplaceWindow.visible);
|
||||||
|
|
|
@ -64,9 +64,7 @@ function buttonClicked(){
|
||||||
isShowingOverlays = true;
|
isShowingOverlays = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//button.writeProperty('buttonState', isShowingOverlays ? 0 : 1);
|
|
||||||
//button.writeProperty('defaultState', isShowingOverlays ? 0 : 1);
|
|
||||||
//button.writeProperty('hoverState', isShowingOverlays ? 2 : 3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.clicked.connect(buttonClicked);
|
button.clicked.connect(buttonClicked);
|
||||||
|
|
|
@ -148,7 +148,7 @@ function resetButtons(pathStillSnapshot, pathAnimatedSnapshot, notify) {
|
||||||
// If we ARE taking an animated snapshot, we've already re-enabled the HUD by this point.
|
// If we ARE taking an animated snapshot, we've already re-enabled the HUD by this point.
|
||||||
if (pathAnimatedSnapshot === "") {
|
if (pathAnimatedSnapshot === "") {
|
||||||
// show hud
|
// show hud
|
||||||
//toolBar.writeProperty("visible", true);
|
|
||||||
Reticle.visible = reticleVisible;
|
Reticle.visible = reticleVisible;
|
||||||
// show overlays if they were on
|
// show overlays if they were on
|
||||||
if (resetOverlays) {
|
if (resetOverlays) {
|
||||||
|
|
Loading…
Reference in a new issue