mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:30:31 +02:00
added support for snapshot notification in HMD, although 3d image overlays seem to be broken in master
This commit is contained in:
parent
04184ee1fb
commit
4eb94f8ccb
1 changed files with 14 additions and 5 deletions
|
@ -251,16 +251,23 @@ function notify(notice, button, height, imageProperties, image) {
|
||||||
notice.leftMargin = 2 * notice.leftMargin * NOTIFICATION_3D_SCALE;
|
notice.leftMargin = 2 * notice.leftMargin * NOTIFICATION_3D_SCALE;
|
||||||
notice.bottomMargin = 0;
|
notice.bottomMargin = 0;
|
||||||
notice.rightMargin = 0;
|
notice.rightMargin = 0;
|
||||||
notice.lineHeight = 10.0 * (fontSize / 12.0) * NOTIFICATION_3D_SCALE;
|
|
||||||
notice.isFacingAvatar = false;
|
positions = calculate3DOverlayPositions(noticeWidth, noticeHeight, notice.y);
|
||||||
|
|
||||||
|
if (!image) {
|
||||||
|
notice.lineHeight = 10.0 * (fontSize / 12.0) * NOTIFICATION_3D_SCALE;
|
||||||
|
notice.isFacingAvatar = false;
|
||||||
|
|
||||||
|
notificationText = Overlays.addOverlay("text3d", notice);
|
||||||
|
notifications.push(notificationText);
|
||||||
|
} else {
|
||||||
|
notifications.push(Overlays.addOverlay("image3d", notice));
|
||||||
|
}
|
||||||
|
|
||||||
button.url = button.imageURL;
|
button.url = button.imageURL;
|
||||||
button.scale = button.width * NOTIFICATION_3D_SCALE;
|
button.scale = button.width * NOTIFICATION_3D_SCALE;
|
||||||
button.isFacingAvatar = false;
|
button.isFacingAvatar = false;
|
||||||
|
|
||||||
positions = calculate3DOverlayPositions(noticeWidth, noticeHeight, notice.y);
|
|
||||||
|
|
||||||
notifications.push((Overlays.addOverlay("text3d", notice)));
|
|
||||||
buttons.push((Overlays.addOverlay("image3d", button)));
|
buttons.push((Overlays.addOverlay("image3d", button)));
|
||||||
overlay3DDetails.push({
|
overlay3DDetails.push({
|
||||||
notificationOrientation: positions.notificationOrientation,
|
notificationOrientation: positions.notificationOrientation,
|
||||||
|
@ -294,6 +301,8 @@ function notify(notice, button, height, imageProperties, image) {
|
||||||
y: notice.y + height,
|
y: notice.y + height,
|
||||||
width: notice.width,
|
width: notice.width,
|
||||||
height: imageHeight,
|
height: imageHeight,
|
||||||
|
topMargin: 0,
|
||||||
|
leftMargin: 0,
|
||||||
imageURL: imageProperties.path
|
imageURL: imageProperties.path
|
||||||
};
|
};
|
||||||
notify(notice, button, imageHeight, imageProperties, true);
|
notify(notice, button, imageHeight, imageProperties, true);
|
||||||
|
|
Loading…
Reference in a new issue