mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
Change default position to be bottom left of HMD recommended rectangle
This commit is contained in:
parent
ccd821118e
commit
33e2cde266
1 changed files with 7 additions and 2 deletions
|
@ -904,7 +904,8 @@ var usersWindow = (function () {
|
||||||
function setUp() {
|
function setUp() {
|
||||||
var textSizeOverlay,
|
var textSizeOverlay,
|
||||||
offsetSetting,
|
offsetSetting,
|
||||||
offset = {};
|
offset = {},
|
||||||
|
hmdViewport;
|
||||||
|
|
||||||
textSizeOverlay = Overlays.addOverlay("text", {
|
textSizeOverlay = Overlays.addOverlay("text", {
|
||||||
font: WINDOW_FONT,
|
font: WINDOW_FONT,
|
||||||
|
@ -926,7 +927,11 @@ var usersWindow = (function () {
|
||||||
windowPosition.y = offset.y <= 0 ? viewport.y + offset.y : offset.y;
|
windowPosition.y = offset.y <= 0 ? viewport.y + offset.y : offset.y;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
windowPosition = { x: 0, y: viewport.y };
|
hmdViewport = Controller.getRecommendedOverlayRect();
|
||||||
|
windowPosition = {
|
||||||
|
x: (viewport.x - hmdViewport.width) / 2, // HMD viewport is narrower than screen.
|
||||||
|
y: hmdViewport.height // HMD viewport starts at top of screen but only extends down so far.
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
calculateWindowHeight();
|
calculateWindowHeight();
|
||||||
|
|
Loading…
Reference in a new issue