diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-20 17:20:47 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:12:55 +0100 |
commit | 1f9b51478992c419faadec81b5766fb7883562ff (patch) | |
tree | 000d8e7e28acfbe23fdf5c619e9b8085a5dc7bdd | |
parent | 1a2218e7ff205ee160b13ce160c5d915e868ea6f (diff) | |
download | richard-iii-1f9b51478992c419faadec81b5766fb7883562ff.tar.gz |
Use ID instead of class for battle dialog.
-rw-r--r-- | play.html | 20 | ||||
-rw-r--r-- | ui.js | 10 |
2 files changed, 13 insertions, 17 deletions
@@ -29,10 +29,6 @@ #log .bs { background-color: lightsteelblue; } #log .br { font-style: italic; text-decoration: underline; } -.battle_header { background-color: silver; } -.battle_message { background-color: silver; } -.battle_separator { background-color: silver; } - .hand { min-height: 300px; } @@ -124,7 +120,7 @@ body.shift .block.known:hover { z-index: 100; } -.battle div.block { +#battle div.block { position: relative; } @@ -175,10 +171,10 @@ div.block { /* BATTLE BOARD */ -.battle { background-color: silver; } -.battle .battle_message { background-color: lightsteelblue; } -.battle .battle_header { background-color: steelblue; color: white; font-weight: bold; } -.battle .battle_separator { background-color: steelblue; } +#battle { background-color: silver; } +#battle_message { background-color: lightsteelblue; } +#battle_header { background-color: steelblue; color: white; font-weight: bold; } +.battle_separator { background-color: steelblue; } .battle_reserves > td > div { height: 75px; padding: 5px; } .battle_a_cell > div { min-width: 180px; padding: 5px 10px; } @@ -278,9 +274,9 @@ div.block { <form id="chat_form" action=""><input id="chat_input" autocomplete="off"></form> </div> -<table class="battle"> +<table id="battle"> <tr> -<th class="battle_header" colspan=4></th> +<th id="battle_header" colspan=4></th> <tr class="battle_reserves enemy"> <td colspan=4><div id="ER"></div></td> <tr class="battle_line enemy"> @@ -298,7 +294,7 @@ div.block { <tr class="battle_reserves friendly"> <td colspan=4><div id="FR"></div></td> <tr> -<th class="battle_message" colspan=4></th> +<th id="battle_message" colspan=4></th> </table> <div id="grid_window"> @@ -782,18 +782,18 @@ function on_update() { update_map(); if (game.battle) { - document.querySelector(".battle_header").textContent = game.battle.title; - document.querySelector(".battle_message").textContent = game.battle.flash; - document.querySelector(".battle").classList.add("show"); + document.getElementById("battle_header").textContent = game.battle.title; + document.getElementById("battle_message").textContent = game.battle.flash; + document.getElementById("battle").classList.add("show"); update_battle(); } else { - document.querySelector(".battle").classList.remove("show"); + document.getElementById("battle").classList.remove("show"); } } build_map(); -drag_element_with_mouse(".battle", ".battle_header"); +drag_element_with_mouse("#battle", "#battle_header"); scroll_with_middle_mouse("#grid_center", 2); init_map_zoom(); init_shift_zoom(); |