38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
import { BaseSheetL5r5e } from "./base-sheet.js";
|
|
import { TwentyQuestionsDialog } from "./twenty-questions-dialog.js";
|
|
|
|
/**
|
|
* Actor / Character Sheet
|
|
*/
|
|
export class ActorSheetL5r5e extends BaseSheetL5r5e {
|
|
static get defaultOptions() {
|
|
return mergeObject(super.defaultOptions, {
|
|
classes: ["l5r5e", "sheet", "actor"],
|
|
template: CONFIG.L5r5e.paths.templates + "sheets/actor-sheet.html",
|
|
width: 600,
|
|
height: 800,
|
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
|
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Add the TwentyQuestions button on top of sheet
|
|
* @override
|
|
*/
|
|
_getHeaderButtons() {
|
|
let buttons = super._getHeaderButtons();
|
|
|
|
buttons.unshift({
|
|
label: game.i18n.localize("l5r5e.twenty_questions.bt_abrev"),
|
|
class: "twenty-questions",
|
|
icon: "fas fa-graduation-cap",
|
|
onclick: async () => {
|
|
await new TwentyQuestionsDialog({}, this.actor).render(true);
|
|
},
|
|
});
|
|
|
|
return buttons;
|
|
}
|
|
}
|