summaryrefslogtreecommitdiff
path: root/ui.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-02 20:48:01 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commit88eabb2b84ff90377630a722a0f593189c6704ad (patch)
tree1b6b581d5df7ae40de7078922dad186dc22804c3 /ui.js
parent7e1f01c2b85f4c2773484bfa30023e552355b387 (diff)
downloadcrusader-rex-88eabb2b84ff90377630a722a0f593189c6704ad.tar.gz
crusader: Merge move phases and make sea moves by sea.
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 90c8ac0..1460612 100644
--- a/ui.js
+++ b/ui.js
@@ -375,7 +375,16 @@ function build_map() {
for (let name in TOWNS) {
let town = TOWNS[name];
- ui.towns[name] = build_town(name, town);
+ if (name == "Sea") {
+ element = document.getElementById("svgmap").getElementById("sea");
+ element.town = "Sea";
+ element.addEventListener("mouseenter", on_focus_town);
+ element.addEventListener("mouseleave", on_blur_town);
+ element.addEventListener("click", on_click_town);
+ ui.towns[name] = element;
+ } else {
+ ui.towns[name] = build_town(name, town);
+ }
}
for (let b in BLOCKS) {