This commit is contained in:
2025-08-04 14:35:05 +02:00
parent d182cabe6c
commit 2cef73e0a1
6 changed files with 20 additions and 8 deletions

View File

@@ -73,23 +73,33 @@ export default class pokemonCharacterSheet extends api.HandlebarsApplicationMixi
}
calculateDerivated(context) {
context.system.armorClass = 10+context.system.stats.defense
context.system.speed = 30+5*context.system.stats.speed
context.system.armorClass = 10+context.system.stats.defense;
context.system.speed = 30+5*context.system.stats.speed;
return context
return context;
}
/** @override */
submit(submitOptions) {
console.log("Submit");
context.system.tab = this.tab;
return super.submit(submitOptions);
}
/** @override */
_onRender(context, options) {
this.tab = context.system.tab;
const tabs = new foundry.applications.ux.Tabs({navSelector: ".tabs", contentSelector: ".content", initial: this.tab});
tabs.bind(this.element);
console.log(this.tab);
console.log("Rendering with "+this.tab+" open");
tabs.activate(this.tab);
tabs.callback = function(){
console.log(tabs.active);
console.log("Switching to "+tabs.active);
this.tab = tabs.active;
}