mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:58:56 +02:00
mostly done interstitial page
This commit is contained in:
parent
46297c6b22
commit
75cc1c62c0
8 changed files with 32 additions and 22 deletions
BIN
interface/resources/images/loadingBar_placard.png
Normal file
BIN
interface/resources/images/loadingBar_placard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
interface/resources/images/loadingBar_progress.png
Normal file
BIN
interface/resources/images/loadingBar_progress.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
|
@ -2973,6 +2973,9 @@ void Application::initializeUi() {
|
||||||
if (_window && _window->isFullScreen()) {
|
if (_window && _window->isFullScreen()) {
|
||||||
setFullscreen(nullptr, true);
|
setFullscreen(nullptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setIsInterstitialMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3451,13 +3454,15 @@ bool Application::isServerlessMode() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Application::isInterstitialMode() const {
|
bool Application::isInterstitialMode() const {
|
||||||
return _interstitialMode;
|
bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial");
|
||||||
|
return interstitialModeEnabled ? _interstitialMode : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setIsInterstitialMode(bool interstitialMode) {
|
void Application::setIsInterstitialMode(bool interstitialMode) {
|
||||||
if (_interstitialMode != interstitialMode) {
|
bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial");
|
||||||
qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> ";
|
if (_interstitialMode != interstitialMode && interstitialModeEnabled) {
|
||||||
_interstitialMode = interstitialMode;
|
_interstitialMode = interstitialMode;
|
||||||
|
qDebug() << "-------> interstitial mode changed: " << _interstitialMode << " ------------> ";
|
||||||
emit interstitialModeChanged(_interstitialMode);
|
emit interstitialModeChanged(_interstitialMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -631,7 +631,7 @@ private:
|
||||||
QSet<int> _keysPressed;
|
QSet<int> _keysPressed;
|
||||||
|
|
||||||
bool _enableProcessOctreeThread;
|
bool _enableProcessOctreeThread;
|
||||||
bool _interstitialMode { true };
|
bool _interstitialMode { false };
|
||||||
|
|
||||||
OctreePacketProcessor _octreeProcessor;
|
OctreePacketProcessor _octreeProcessor;
|
||||||
EntityEditPacketSender _entityEditSender;
|
EntityEditPacketSender _entityEditSender;
|
||||||
|
|
|
@ -781,6 +781,7 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Developer > Show Overlays
|
// Developer > Show Overlays
|
||||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Overlays, 0, true);
|
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Overlays, 0, true);
|
||||||
|
addCheckableActionToQMenuAndActionHash(developerMenu, "Enable Interstitial", 0, false);
|
||||||
|
|
||||||
#if 0 /// -------------- REMOVED FOR NOW --------------
|
#if 0 /// -------------- REMOVED FOR NOW --------------
|
||||||
addDisabledActionAndSeparator(navigateMenu, "History");
|
addDisabledActionAndSeparator(navigateMenu, "History");
|
||||||
|
|
|
@ -34,8 +34,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
||||||
"system/emote.js"
|
"system/emote.js"
|
||||||
];
|
];
|
||||||
var DEFAULT_SCRIPTS_SEPARATE = [
|
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||||
"system/controllers/controllerScripts.js",
|
"system/controllers/controllerScripts.js"
|
||||||
"system/interstitialPage.js"
|
|
||||||
//"system/chat.js"
|
//"system/chat.js"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
(function() {
|
(function() {
|
||||||
Script.include("/~/system/libraries/Xform.js");
|
Script.include("/~/system/libraries/Xform.js");
|
||||||
var DEBUG = true;
|
var DEBUG = true;
|
||||||
var MAX_X_SIZE = 4;
|
var MAX_X_SIZE = 3.8;
|
||||||
var EPSILON = 0.25;
|
var EPSILON = 0.01;
|
||||||
var isVisible = false;
|
var isVisible = false;
|
||||||
var STABILITY = 3.0;
|
var STABILITY = 3.0;
|
||||||
var VOLUME = 0.4;
|
var VOLUME = 0.4;
|
||||||
|
@ -149,8 +149,8 @@
|
||||||
|
|
||||||
var loadingBarPlacard = Overlays.addOverlay("image3d", {
|
var loadingBarPlacard = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Bar-Placard",
|
name: "Loading-Bar-Placard",
|
||||||
localPosition: { x: 0.0, y: -0.99, z: 0.0 },
|
localPosition: { x: 0.0, y: -0.99, z: 0.3 },
|
||||||
url: "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/loadingBar_placard.png",
|
url: Script.resourcesPath() + "images/loadingBar_placard.png",
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
dimensions: { x: 4, y: 2.8},
|
dimensions: { x: 4, y: 2.8},
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
|
@ -164,10 +164,10 @@
|
||||||
|
|
||||||
var loadingBarProgress = Overlays.addOverlay("image3d", {
|
var loadingBarProgress = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Bar-Progress",
|
name: "Loading-Bar-Progress",
|
||||||
localPosition: { x: 0.0, y: -0.99, z: 0.0 },
|
localPosition: { x: 0.0, y: -0.90, z: 0.0 },
|
||||||
url: Script.resourcesPath() + "images/loadingBar_v1.png",
|
url: Script.resourcesPath() + "images/loadingBar_progress.png",
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
dimensions: {x: 4, y: 2.8},
|
dimensions: {x: 3.8, y: 2.8},
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
ignoreRayIntersection: false,
|
ignoreRayIntersection: false,
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var THE_PLACE = "hifi://TheSpot";
|
var THE_PLACE = "hifi://TheSpot-dev";
|
||||||
function clickedOnOverlay(overlayID, event) {
|
function clickedOnOverlay(overlayID, event) {
|
||||||
print(overlayID + " other: " + loadingToTheSpotID);
|
print(overlayID + " other: " + loadingToTheSpotID);
|
||||||
if (loadingToTheSpotID === overlayID) {
|
if (loadingToTheSpotID === overlayID) {
|
||||||
|
@ -309,6 +309,11 @@
|
||||||
visible: !physicsEnabled
|
visible: !physicsEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var loadingBarProperties = {
|
||||||
|
dimensions: { x: 0.0, y: 2.8 },
|
||||||
|
visible: !physicsEnabled
|
||||||
|
};
|
||||||
|
|
||||||
// Menu.setIsOptionChecked("Show Overlays", physicsEnabled);
|
// Menu.setIsOptionChecked("Show Overlays", physicsEnabled);
|
||||||
|
|
||||||
if (!HMD.active) {
|
if (!HMD.active) {
|
||||||
|
@ -324,7 +329,7 @@
|
||||||
Overlays.editOverlay(domainDescription, domainTextProperties);
|
Overlays.editOverlay(domainDescription, domainTextProperties);
|
||||||
Overlays.editOverlay(domainToolTip, properties);
|
Overlays.editOverlay(domainToolTip, properties);
|
||||||
Overlays.editOverlay(loadingBarPlacard, properties);
|
Overlays.editOverlay(loadingBarPlacard, properties);
|
||||||
Overlays.editOverlay(loadingBarProgress, properties);
|
Overlays.editOverlay(loadingBarProgress, loadingBarProperties);
|
||||||
|
|
||||||
Camera.mode = "first person";
|
Camera.mode = "first person";
|
||||||
}
|
}
|
||||||
|
@ -349,13 +354,13 @@
|
||||||
lastInterval = thisInterval;
|
lastInterval = thisInterval;
|
||||||
timeElapsed += deltaTime;
|
timeElapsed += deltaTime;
|
||||||
|
|
||||||
progress += MAX_X_SIZE * (deltaTime / 1000);
|
progress += (deltaTime / 1000);
|
||||||
print(progress);
|
|
||||||
if (progress > MAX_X_SIZE) {
|
if (progress > MAX_X_SIZE) {
|
||||||
progress = 4;
|
progress = MAX_X_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
var properties = {
|
var properties = {
|
||||||
localPosition: { x: 2.0 - (progress / 2), y: -0.99, z: -0.3 },
|
localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 },
|
||||||
dimensions: {
|
dimensions: {
|
||||||
x: progress,
|
x: progress,
|
||||||
y: 2.8
|
y: 2.8
|
||||||
|
@ -402,7 +407,7 @@
|
||||||
}
|
}
|
||||||
currentProgress = lerp(currentProgress, target, 0.2);
|
currentProgress = lerp(currentProgress, target, 0.2);
|
||||||
var properties = {
|
var properties = {
|
||||||
localPosition: { x: 2 - (currentProgress / 2), y: -0.99, z: -0.3 },
|
localPosition: { x: (1.85 - (progress / 2) - (-0.029 * (progress / MAX_X_SIZE))), y: -0.935, z: 0.0 },
|
||||||
dimensions: {
|
dimensions: {
|
||||||
x: currentProgress,
|
x: currentProgress,
|
||||||
y: 2.8
|
y: 2.8
|
||||||
|
@ -410,7 +415,7 @@
|
||||||
};
|
};
|
||||||
print("progress: " + currentProgress);
|
print("progress: " + currentProgress);
|
||||||
Overlays.editOverlay(loadingBarProgress, properties);
|
Overlays.editOverlay(loadingBarProgress, properties);
|
||||||
if (((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON))) || connectionToDomainFailed)) {
|
if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) {
|
||||||
print("----------> ending <--------");
|
print("----------> ending <--------");
|
||||||
updateOverlays((physicsEnabled || connectionToDomainFailed));
|
updateOverlays((physicsEnabled || connectionToDomainFailed));
|
||||||
endAudio();
|
endAudio();
|
||||||
|
@ -441,7 +446,7 @@
|
||||||
updateOverlays(toggle);
|
updateOverlays(toggle);
|
||||||
|
|
||||||
if (!toggle) {
|
if (!toggle) {
|
||||||
//Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS);
|
// Script.setTimeout(updateProgress, BASIC_TIMER_INTERVAL_MS);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue