Added next bt in 20Q

Disable roll button if no dice selected
This commit is contained in:
Vlyan
2021-01-05 11:45:40 +01:00
parent f7e10e37f7
commit 1a292feee2
7 changed files with 30 additions and 3 deletions

View File

@@ -152,6 +152,15 @@ export class TwentyQuestionsDialog extends FormApplication {
tgt.hasClass("toggle-active") ? tgt.removeClass("toggle-active") : tgt.addClass("toggle-active");
});
// BT Next
html.find(".next").on("click", (event) => {
event.preventDefault();
event.stopPropagation();
const tab = this._tabs.find((e) => e._navSelector === ".sheet-tabs");
const next = parseInt(tab.active.replace(/[^0-9]/g, "")) + 1;
tab.activate("part" + next);
});
// *** Everything below here is only needed if the sheet is editable ***
if (!this.options.editable) {
return;