mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +02:00
including images/parent buttons to text
This commit is contained in:
parent
42579f3d16
commit
54f800fbda
3 changed files with 14 additions and 12 deletions
BIN
interface/resources/images/interstitialPage/button_back.png
Normal file
BIN
interface/resources/images/interstitialPage/button_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
interface/resources/images/interstitialPage/button_tryAgain.png
Normal file
BIN
interface/resources/images/interstitialPage/button_tryAgain.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
|
@ -29,53 +29,49 @@
|
||||||
|
|
||||||
var redirectOopsText = Overlays.addOverlay("text3d", {
|
var redirectOopsText = Overlays.addOverlay("text3d", {
|
||||||
name: "oopsText",
|
name: "oopsText",
|
||||||
// position: { x: 0.2656, y: 1.6764, z: 1.4593},
|
localPosition: {x: 0.5691902160644531, y: 0.6403706073760986, z: 6.68358039855957},
|
||||||
position: { x: 0.0, y: 1.6764, z: 1.4593},
|
|
||||||
text: getOopsText(),
|
text: getOopsText(),
|
||||||
textAlpha: 1,
|
textAlpha: 1,
|
||||||
backgroundAlpha: 0,
|
backgroundAlpha: 0,
|
||||||
lineHeight: 0.13,
|
lineHeight: 0.13,
|
||||||
// dimensions: {x: 2.58, y: 2.58},
|
|
||||||
visible: false,
|
visible: false,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
ignoreRayIntersection: false,
|
ignoreRayIntersection: false,
|
||||||
drawInFront: true,
|
drawInFront: true,
|
||||||
grabbable: false,
|
grabbable: false,
|
||||||
orientation: {x: 0.0, y: 0.5, z: 0, w: 0.87},
|
orientation: {x: 0.0, y: 0.5, z: 0.0, w: 0.87},
|
||||||
parentID: MyAvatar.SELF_ID
|
parentID: MyAvatar.SELF_ID
|
||||||
});
|
});
|
||||||
print("redirect oops text = " + redirectOopsText);
|
print("redirect oops text = " + redirectOopsText);
|
||||||
|
|
||||||
var tryAgainImage = Overlays.addOverlay("image3d", {
|
var tryAgainImage = Overlays.addOverlay("image3d", {
|
||||||
name: "tryAgainImage",
|
name: "tryAgainImage",
|
||||||
position: { x: 0.0, y: 1.0695, z: 1.9094},
|
localPosition: { x: -0.15, y: -0.4, z: 0.0},
|
||||||
url: Script.resourcesPath() + "images/interstitialPage/button_tryAgain.png",
|
url: Script.resourcesPath() + "images/interstitialPage/button_tryAgain.png",
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
// dimensions: {x: 0.9, y: 0.4},
|
|
||||||
visible: false,
|
visible: false,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
ignoreRayIntersection: false,
|
ignoreRayIntersection: false,
|
||||||
drawInFront: true,
|
drawInFront: true,
|
||||||
grabbable: false,
|
grabbable: false,
|
||||||
orientation: {x: 0.0, y: 0.5, z: 0, w: 0.87},
|
orientation: {x: 0.0, y: 0.5, z: 0, w: 0.87},
|
||||||
parentID: MyAvatar.SELF_ID
|
parentID: redirectOopsText
|
||||||
});
|
});
|
||||||
print("try again image = " + tryAgainImage);
|
print("try again image = " + tryAgainImage);
|
||||||
|
Window.copyToClipboard(redirectOopsText);
|
||||||
|
|
||||||
var backImage = Overlays.addOverlay("image3d", {
|
var backImage = Overlays.addOverlay("image3d", {
|
||||||
name: "backImage",
|
name: "backImage",
|
||||||
position: { x: 0.525, y: 1.0695, z: 1.0186},
|
localPosition: { x: 1.0, y: -0.4, z: 0.0},
|
||||||
url: Script.resourcesPath() + "images/interstitialPage/button_back.png",
|
url: Script.resourcesPath() + "images/interstitialPage/button_back.png",
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
// dimensions: {x: 0.9, y: 0.4},
|
|
||||||
visible: false,
|
visible: false,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
ignoreRayIntersection: false,
|
ignoreRayIntersection: false,
|
||||||
drawInFront: true,
|
drawInFront: true,
|
||||||
grabbable: false,
|
grabbable: false,
|
||||||
localOrientation: Quat.fromVec3Degrees({ x: 0.0, y: 180.0, z: 0.0 }),
|
|
||||||
orientation: {x: 0.0, y: 0.5, z: 0, w: 0.87},
|
orientation: {x: 0.0, y: 0.5, z: 0, w: 0.87},
|
||||||
parentID: MyAvatar.SELF_ID
|
parentID: redirectOopsText
|
||||||
});
|
});
|
||||||
print("back image = " + backImage);
|
print("back image = " + backImage);
|
||||||
|
|
||||||
|
@ -106,15 +102,21 @@
|
||||||
|
|
||||||
Overlays.editOverlay(redirectOopsText, oopsTextProperties);
|
Overlays.editOverlay(redirectOopsText, oopsTextProperties);
|
||||||
Overlays.editOverlay(tryAgainImage, properties);
|
Overlays.editOverlay(tryAgainImage, properties);
|
||||||
Overlays.editOverlay(backImage, properties)
|
Overlays.editOverlay(backImage, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickedOnOverlay(overlayID, event) {
|
function clickedOnOverlay(overlayID, event) {
|
||||||
|
var properties = {
|
||||||
|
visible: false
|
||||||
|
};
|
||||||
if (tryAgainImage === overlayID) {
|
if (tryAgainImage === overlayID) {
|
||||||
location.goToLastAddress();
|
location.goToLastAddress();
|
||||||
} else if (backImage === overlayID) {
|
} else if (backImage === overlayID) {
|
||||||
location.goBack();
|
location.goBack();
|
||||||
}
|
}
|
||||||
|
Overlays.editOverlay(redirectOopsText, properties);
|
||||||
|
Overlays.editOverlay(tryAgainImage, properties);
|
||||||
|
Overlays.editOverlay(backImage, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
|
Loading…
Reference in a new issue