diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-02 20:48:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:19:39 +0100 |
commit | 88eabb2b84ff90377630a722a0f593189c6704ad (patch) | |
tree | 1b6b581d5df7ae40de7078922dad186dc22804c3 /ui.js | |
parent | 7e1f01c2b85f4c2773484bfa30023e552355b387 (diff) | |
download | crusader-rex-88eabb2b84ff90377630a722a0f593189c6704ad.tar.gz |
crusader: Merge move phases and make sea moves by sea.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) { |