diff --git a/script.js b/script.js index 3f5d070..e3e67a6 100644 --- a/script.js +++ b/script.js @@ -661,8 +661,9 @@ class Board { this.buttons.optFancy = this.addButton(x0, cfgy0, 'Effects:', 'config'); this.buttons.optBlockedEffect = this.addButton(x0, cfgy0+ysp2, 'Dim Blocked:', 'config'); this.buttons.optSloppy = this.addButton(x0, cfgy0+ysp2*2, 'Sloppy Mode:', 'config'); + this.buttons.toggleFullscreen = this.addButton(x0, cfgy0+ysp2*-1.5, 'Fullscreen', 'config'); - this.buttons.btnAbout = this.addButton(x0, cfgy0+ysp2*-1.5, 'Help', 'config'); + this.buttons.btnAbout = this.addButton(x0, cfgy0+ysp2*-2.5, 'Help', 'config'); } updateSettingsGUI(cfg) { @@ -1646,6 +1647,15 @@ class Game { allowTemplateAugmenting: !this.cfg.allowTemplateAugmenting, }) }); + + this.board.buttons.toggleFullscreen.addEventListener('click', () => { + this.info("Toggle Fullscreen"); + if (document.fullscreenElement) { + document.exitFullscreen(); + } else { + this.board.$svg.requestFullscreen(); + } + }); } /** diff --git a/style.css b/style.css index 7f3962f..81a6655 100644 --- a/style.css +++ b/style.css @@ -16,6 +16,7 @@ html, body { #board { height: 100%; width: 100%; + background: #201717; } .disabled .orb {