diff --git a/frontend/frontend.js b/frontend/frontend.js index e3ff788..16853fb 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -20,6 +20,7 @@ document.querySelector('#settings').addEventListener('submit', (e) => { ppTimer: document.querySelector('#ppTimer').checked, delay: parseInt(document.querySelector('#delay').value), showNicknames: document.querySelector('#showNicknames').checked, + showTournament: document.querySelector('#showTournament').checked, scoreboard: { active: document.querySelector('#scoreboard-active').checked, score: document.querySelector('#scoreboard-score').checked, @@ -201,6 +202,7 @@ function initSettings(settings) { document.querySelector('#ppTimer').checked = settings.ppTimer document.querySelector('#delay').value = settings.delay document.querySelector('#showNicknames').checked = settings.showNicknames + document.querySelector('#showTournament').checked = settings.showTournament document.querySelector('#scoreboard-active').checked = settings.scoreboard.active diff --git a/frontend/gfx/ingame.js b/frontend/gfx/ingame.js index b5e1693..1f49f8b 100644 --- a/frontend/gfx/ingame.js +++ b/frontend/gfx/ingame.js @@ -1,6 +1,7 @@ const blueTeam = document.querySelector('#blue') const redTeam = document.querySelector('#red') let showNicknames, + showTournament, showLeaderBoard, showScoreBoard, score, @@ -636,6 +637,10 @@ function updateSettings(e) { }) } } + if (e.showTournament !== showTournament) { + showTournament = e.showTournament + document.querySelector('#tournament').style.display = e.showTournament ? 'block' : 'none' + } if (showScoreBoard !== e.scoreboard.active) { showScoreBoard = e.scoreboard.active diff --git a/frontend/index.html b/frontend/index.html index f975dc9..093026b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -367,6 +367,15 @@

Settings

/> +
+ + +
diff --git a/plugin.ts b/plugin.ts index 3251621..517597c 100644 --- a/plugin.ts +++ b/plugin.ts @@ -25,6 +25,7 @@ module.exports = async (ctx: PluginContext) => { killfeed: false, ppTimer: false, showNicknames: false, + showTournament: true, delay: 0, scoreboard: { active: true, @@ -47,6 +48,7 @@ module.exports = async (ctx: PluginContext) => { config.ppTimer = e.ppTimer config.delay = e.delay config.showNicknames = e.showNicknames + config.showTournament = e.showTournament config.scoreboard = e.scoreboard ctx.LPTE.emit({ diff --git a/types/Config.d.ts b/types/Config.d.ts index 0779270..9c21985 100644 --- a/types/Config.d.ts +++ b/types/Config.d.ts @@ -6,6 +6,7 @@ export interface Config { ppTimer: boolean delay: number showNicknames: boolean + showTournament: boolean scoreboard: { active: boolean score: boolean