Fix bug with Game Bar when showing it on the right side

This commit is contained in:
redphx 2024-05-12 14:40:15 +07:00
parent 8a1dff3372
commit 4068930db7
2 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,7 @@
transition: opacity 0.1s ease-in; transition: opacity 0.1s ease-in;
&.bx-show { &.bx-show {
opacity: 1; opacity: 0.9;
+ svg { + svg {
display: none !important; display: none !important;
@ -111,6 +111,7 @@
direction: rtl; direction: rtl;
.bx-game-bar-container { .bx-game-bar-container {
direction: ltr;
border-radius: 10px 0 0 10px; border-radius: 10px 0 0 10px;
} }
} }

View File

@ -45,6 +45,11 @@ export class GameBar {
new MicrophoneAction(), new MicrophoneAction(),
]; ];
// Reverse the action list if Game Bar's position is on the right side
if (position === 'bottom-right') {
this.actions.reverse();
}
// Render actions // Render actions
for (const action of this.actions) { for (const action of this.actions) {
$container.appendChild(action.render()); $container.appendChild(action.render());