]> Stephen's Gitweb - donsol-js.git/commitdiff
Add Roguelite and Tape themes
authorStephen Jianu <stephen@stephenjianu.com>
Sun, 31 Dec 2023 23:00:33 +0000 (17:00 -0600)
committerStephen Jianu <stephen@stephenjianu.com>
Sun, 31 Dec 2023 23:00:33 +0000 (17:00 -0600)
sources/scripts/donsol.js
sources/scripts/player.js
sources/scripts/settings.js

index e0e2656fde28415e8854776bbe1867403b4279d2..ec9f91af48bd8f7c21a4dd101f592f80e73e5df4 100644 (file)
@@ -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)
 
index d787b91e79e6857e41624facb36d903a71919cca..73eb54e0c4861376055dae9276666a71c8f46160 100644 (file)
@@ -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)
index 96931b6450b127eada4fdfc432b839d7af7d2cf5..1fa776f6478a193d1903fe2d32ac2e961d0795c1 100644 (file)
@@ -13,6 +13,8 @@ function Settings () {
     this.theme_button.innerHTML = '<option value=\"theme\">Theme (default)</option>'
     this.theme_button.innerHTML += '<option value=\"gameboy\">Game Boy</option>'
     this.theme_button.innerHTML += '<option value=\"nightowl\">Night Owl</option>'
+    this.theme_button.innerHTML += '<option value=\"roguelite\">Roguelite</option>'
+    this.theme_button.innerHTML += '<option value=\"tape\">Tape</option>'
     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) })