Compare commits

..

2 Commits

Author SHA1 Message Date
6c4714048f updated 2023-08-30 11:29:01 +02:00
6185ba0865 fixed a bug where actions menus wouldn't close on clicking in an empty space 2023-08-30 11:28:36 +02:00
2 changed files with 6 additions and 3 deletions

View File

@ -47,13 +47,13 @@
- war ein fehlendes let in editCombatant() -> wo das nur wieder herkam …
- x Sortierung falsch, wenn Ini gleich und Rea unterschiedlich
- x icons for dead and K.O don't load
- x actions-menu soll zugehen, wenn man auf eine freie Stelle klickt (so wie damage-monitor)
### open
- im FP3T Tor Browser kann ich rauszoomen, bis ich die ganzen damage monitors und action menus sehe -> verhindern!
- action-menu und damage-monitor sliden jetzt nicht mehr rein, sondern bleiben an Ort und Stelle
- das sollte die Sache verhindern
- action-menu soll zugehen, wenn man auf eine freie Stelle klickt (so wie damage-monitor)
- make color scheme friendly for people with red green bindness (Felix)
- see here: https://venngage.com/tools/accessible-color-palette-generator
- current main color (turquoise): #001d1d

View File

@ -28,7 +28,7 @@ const DAMAGE_PENALTY = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4];
const DAMAGE_NIVEAU = ["", "L", "M", "S", "D"];
const COMBATANT_TABLE_ROW = [
'<tr class="combatant-row" data-true-ini="" data-augmented-ui="tl-scoop bl-clip-y tr-clip-y br-scoop">\n', //TODO: add data-damage-* attributes with initial damage levels
'<tr class="combatant-row" data-true-ini="" data-augmented-ui="tl-scoop bl-clip-y tr-clip-y br-scoop">\n',
'<td class="combatant-name" title="Combatant\'s name" data-bs-toggle="modal" data-bs-target="#combatant-modal" data-augmented-ui="tl-scoop bl-clip-y both"></td>\n',
'<td class="combatant-ini" title="Effective initiative (w/ wound penalties)" data-bs-toggle="modal" data-bs-target="#combatant-modal" data-augmented-ui="both"></td>\n',
'<td class="combatant-dice-and-rea" title="Iniative dice and reaction" data-bs-toggle="modal" data-bs-target="#combatant-modal" data-augmented-ui="both"><span class="combatant-dice"></span>D+<span class="combatant-rea"></span></td>\n',
@ -499,11 +499,14 @@ $(document).ready(function () {
$('#combatant-modal').on('shown.bs.modal', () => $('#combatant-modal-name').focus());
// always empty input fields when combatant modal disappears
$("#combatant-modal").on('hidden.bs.modal', () => $("input[id*='combatant-modal']").val(""));
// Hide damage monitors after click somewhere else
// Hide damage monitors and actions menus after click somewhere else
$("html").on("click", (e) => {
if ($(e.target).parents(".damage-monitor").length == 0) {
$(".damage-monitor.seen").removeClass("seen");
}
if ($(e.target).parents(".actions-menu").length == 0) {
$(".actions-menu.seen").removeClass("seen");
}
});
addTestCombatant();
});