summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/play.js b/play.js
index 2beae4e..c188a83 100644
--- a/play.js
+++ b/play.js
@@ -1,8 +1,11 @@
"use strict"
-// TODO: battle dialog popup for rolling and assigning hits!
// TODO: show killed leaders taken for bonus purchase
+function check_menu(id, x) {
+ document.getElementById(id).className = x ? "menu_item checked" : "menu_item unchecked"
+}
+
const ICONS = {
B0: '<span class="black d0"></span>',
B1: '<span class="black d1"></span>',
@@ -1717,5 +1720,21 @@ function on_blur_tip() {
ui.card_tip.className = "hide"
}
+let tint = window.localStorage[params.title_id + "/tint"]
+if (tint === undefined)
+ tint = 1
+
+set_tint(tint)
+
+function set_tint(x) {
+ window.localStorage[params.title_id + "/tint"] = tint = x
+ check_menu("tint", !!tint)
+ ui.body.classList.toggle("tint", !!tint)
+}
+
+function toggle_tint() {
+ set_tint(!tint)
+}
+
on_init()
scroll_with_middle_mouse("main")