From 6f8ed0141a34711471d627fdca8551269a99266f Mon Sep 17 00:00:00 2001 From: Stephen Jianu Date: Sun, 31 Dec 2023 17:00:33 -0600 Subject: [PATCH] Add Roguelite and Tape themes --- sources/scripts/donsol.js | 22 ++++++++++++++++++++++ sources/scripts/player.js | 6 ++++++ sources/scripts/settings.js | 2 ++ 3 files changed, 30 insertions(+) diff --git a/sources/scripts/donsol.js b/sources/scripts/donsol.js index e0e2656..ec9f91a 100644 --- a/sources/scripts/donsol.js +++ b/sources/scripts/donsol.js @@ -40,6 +40,28 @@ function Donsol () { b_low: '#2f4759', b_inv: '#7fdbca' } + this.rogueliteTheme = { + background: '#352b31', + f_high: '#f5f5d4', + f_med: '#70838c', + f_low: '#4a6b83', + f_inv: '#352b31', + b_high: '#96cf85', + b_med: '#5a6970', + b_low: '#4a3b44', + b_inv: '#f5f5d4' + } + this.tapeTheme = { + background: '#dad7cd', + f_high: '#696861', + f_med: '#ffffff', + f_low: '#b3b2ac', + f_inv: '#43423e', + b_high: '#43423e', + b_med: '#c2c1bb', + b_low: '#e5e3dc', + b_inv: '#eb3f48' + } this.theme = new Theme(this.defaultTheme) diff --git a/sources/scripts/player.js b/sources/scripts/player.js index d787b91..73eb54e 100644 --- a/sources/scripts/player.js +++ b/sources/scripts/player.js @@ -158,6 +158,12 @@ function Player () { if (theme_value.localeCompare('nightowl') === 0) { new_theme = donsol.nightowlTheme } + if (theme_value.localeCompare('roguelite') === 0) { + new_theme = donsol.rogueliteTheme + } + if (theme_value.localeCompare('tape') === 0) { + new_theme = donsol.tapeTheme + } donsol.theme = new Theme(new_theme) donsol.theme.load(new_theme) donsol.theme.install(document.body) diff --git a/sources/scripts/settings.js b/sources/scripts/settings.js index 96931b6..1fa776f 100644 --- a/sources/scripts/settings.js +++ b/sources/scripts/settings.js @@ -13,6 +13,8 @@ function Settings () { this.theme_button.innerHTML = '' this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' + this.theme_button.innerHTML += '' + this.theme_button.innerHTML += '' this.theme_button.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) }) this.theme_button.addEventListener('change', () => { donsol.player.change_theme(this.theme_button.value) }) -- 2.39.5