group header

This commit is contained in:
François-Xavier Guillois
2023-09-01 09:49:46 +02:00
parent 8d0c8d1774
commit 39c984156b
8 changed files with 86 additions and 50 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
}
/**
* Handle clickable rolls.
* Handle totem pick
* @param {Event} event The originating click event
* @private
*/
+19 -1
View File
@@ -1,5 +1,6 @@
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
import { VermineActorSheet } from "./actor-sheet.mjs";
import { TotemPicker } from "../system/applications.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
@@ -129,7 +130,7 @@ export class VermineGroupSheet extends VermineActorSheet {
/** @override */
activateListeners(html) {
super.activateListeners(html);
console.log('evenement de groupe');
// Render the item sheet for viewing/editing prior to the editable check.
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
@@ -152,6 +153,9 @@ export class VermineGroupSheet extends VermineActorSheet {
li.slideUp(200, () => this.render(false));
});
// Choose Totem
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
// Active Effect management
html.find(".effect-control").click(ev => onManageActiveEffect(ev, this.actor));
@@ -228,4 +232,18 @@ export class VermineGroupSheet extends VermineActorSheet {
}
}
/**
* Handle totem pick
* @param {Event} event The originating click event
* @private
*/
_onTotemButton(event) {
event.preventDefault();
const el = event.currentTarget;
// const dataset = el.dataset;
const totemPicker = new TotemPicker(el, this.actor);
totemPicker.render(true);
}
}