Add option for Game Bar's position

This commit is contained in:
redphx
2024-05-12 08:01:49 +07:00
parent 84adf9989e
commit 1be9bd8ee1
6 changed files with 40 additions and 12 deletions

View File

@@ -31,7 +31,10 @@ export class GameBar {
private constructor() {
let $container;
const $gameBar = CE('div', {id: 'bx-game-bar', class: 'bx-gone'},
const position = getPref(PrefKey.GAME_BAR_POSITION);
const $gameBar = CE('div', {id: 'bx-game-bar', class: 'bx-gone', 'data-position': position},
$container = CE('div', {class: 'bx-game-bar-container bx-offscreen'}),
createSvgIcon(BxIcon.CARET_RIGHT),
);

View File

@@ -28,8 +28,6 @@ const SETTINGS_UI = {
PrefKey.STREAM_TARGET_RESOLUTION,
PrefKey.STREAM_CODEC_PROFILE,
PrefKey.GAME_BAR_ENABLED,
PrefKey.AUDIO_MIC_ON_PLAYING,
PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG,
@@ -42,6 +40,12 @@ const SETTINGS_UI = {
],
},
[t('game-bar')]: {
items: [
PrefKey.GAME_BAR_POSITION,
],
},
[t('local-co-op')]: {
items: [
PrefKey.LOCAL_CO_OP_ENABLED,