mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-04 04:04:37 +02:00
Merge pull request #12308 from vladest/fix_progress_animation
Image overlay uses bounds property
This commit is contained in:
commit
00b184124d
1 changed files with 5 additions and 5 deletions
|
@ -300,7 +300,7 @@
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
x = ((Date.now() / 1000) % ANIMATION_SECONDS_PER_REPEAT) / ANIMATION_SECONDS_PER_REPEAT;
|
x = ((Date.now() / 1000) % ANIMATION_SECONDS_PER_REPEAT) / ANIMATION_SECONDS_PER_REPEAT;
|
||||||
if (isHMD) {
|
if (!isHMD) {
|
||||||
x = x * barDesktop.repeat;
|
x = x * barDesktop.repeat;
|
||||||
} else {
|
} else {
|
||||||
x = x * BAR_HMD_REPEAT;
|
x = x * BAR_HMD_REPEAT;
|
||||||
|
@ -309,9 +309,9 @@
|
||||||
// Update progress bar
|
// Update progress bar
|
||||||
Overlays.editOverlay(barDesktop.overlay, {
|
Overlays.editOverlay(barDesktop.overlay, {
|
||||||
visible: !isHMD,
|
visible: !isHMD,
|
||||||
subImage: {
|
bounds: {
|
||||||
x: barDesktop.repeat - x,
|
x: barDesktop.repeat - x,
|
||||||
y: 0,
|
y: windowHeight - barDesktop.height,
|
||||||
width: barDesktop.width - barDesktop.repeat,
|
width: barDesktop.width - barDesktop.repeat,
|
||||||
height: barDesktop.height
|
height: barDesktop.height
|
||||||
}
|
}
|
||||||
|
@ -319,9 +319,9 @@
|
||||||
|
|
||||||
Overlays.editOverlay(barHMD.overlay, {
|
Overlays.editOverlay(barHMD.overlay, {
|
||||||
visible: isHMD,
|
visible: isHMD,
|
||||||
subImage: {
|
bounds: {
|
||||||
x: BAR_HMD_REPEAT - x,
|
x: BAR_HMD_REPEAT - x,
|
||||||
y: 0,
|
y: windowHeight - BAR_HMD_HEIGHT,
|
||||||
width: BAR_HMD_WIDTH - BAR_HMD_REPEAT,
|
width: BAR_HMD_WIDTH - BAR_HMD_REPEAT,
|
||||||
height: BAR_HMD_HEIGHT
|
height: BAR_HMD_HEIGHT
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue