Added more default values for new combatants

This commit is contained in:
Tobias 2023-07-27 10:48:14 +02:00
parent 774762da56
commit 043a1e6c48
2 changed files with 8 additions and 1 deletions

View File

@ -45,6 +45,8 @@
- x combatant modal hat auf einmal zwei OK buttons
- Fehler beim sichtbar/unsichtbar-Setzen der modal buttons in handleEditButtonClick()
- x Änderungen im edit modal werden nicht mehr übernommen
- war ein fehlendes let in editCombatant() -> wo das nur wieder herkam …
- im FP3T Tor Browser kann ich rauszoomen, bis ich die ganzen damage monitors und action menus sehe -> verhindern!
- bug in validateCombatant: OK schließt das modal, auch wenn die Eingaben invalid sind
- wenn ich bei add combatant mit der Maus auf OK klicke, macht er das Modal zu, auch wenn die Eingaben invalid sind

View File

@ -117,7 +117,8 @@ function addTestCombatant() {
$("#combatant-modal-dice").val(3);
$("#combatant-modal-rea").val(6);
// $("#combatant-modal-ini").val(12);
setTimeout( () => $("#combatant-modal-add-ok-button").click(), 500);
addCombatant();
// setTimeout( () => $("#combatant-modal-add-ok-button").click(), 500);
}
@ -141,6 +142,10 @@ function handleAddButtonClick(e) {
$("#combatant-modal .modal-title").text("Add Combatant");
$("#combatant-modal-add-ok-button, #combatant-modal-add-apply-button").removeClass("d-none");
$("#combatant-modal-edit-ok-button").addClass("d-none");
// set default values
$("#combatant-modal-name").val("Goon 1");
$("#combatant-modal-dice").val("2");
$("#combatant-modal-rea").val("7");
// set damage sliders to zero
$("#combatant-modal-stun, #combatant-modal-physical").val("0");
// add handler for enter key