Added next bt in 20Q
Disable roll button if no dice selected
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -241,6 +241,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
actorIsPc: !this._actor || this._actor.data?.type === "character",
|
||||
canUseVoidPoint:
|
||||
this.object.difficulty.hidden || !this._actor || this._actor.data.data.void_points.value > 0,
|
||||
disableSubmit: this.object.skill.value < 1 && this.object.ring.value < 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user