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

@@ -150,7 +150,7 @@ window.addEventListener(BxEvent.STREAM_PLAYING, e => {
STATES.isPlaying = true;
injectStreamMenuButtons();
if (getPref(PrefKey.GAME_BAR_ENABLED)) {
if (getPref(PrefKey.GAME_BAR_POSITION) !== 'off') {
const gameBar = GameBar.getInstance();
gameBar.reset();
gameBar.enable();
@@ -213,7 +213,7 @@ function main() {
// Setup UI
addCss();
Toast.setup();
getPref(PrefKey.GAME_BAR_ENABLED) && GameBar.getInstance();
(getPref(PrefKey.GAME_BAR_POSITION) !== 'off') && GameBar.getInstance();
BX_FLAGS.PreloadUi && setupStreamUi();
StreamBadges.setupEvents();