mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Added a render hook for the daggerheartMenu render
This commit is contained in:
parent
630ba5ab7d
commit
3f228db420
4 changed files with 28 additions and 1 deletions
|
|
@ -43,6 +43,18 @@ export default class DaggerheartMenu extends HandlebarsApplicationMixin(Abstract
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
|
async _onRender(context, options) {
|
||||||
|
super._onRender(context, options);
|
||||||
|
|
||||||
|
Hooks.callAll(
|
||||||
|
CONFIG.DH.HOOKS.sidebarMenuRender,
|
||||||
|
this,
|
||||||
|
this.element.querySelector('[data-application-part="main"]'),
|
||||||
|
context
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
async _prepareContext(options) {
|
async _prepareContext(options) {
|
||||||
const context = await super._prepareContext(options);
|
const context = await super._prepareContext(options);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ export * as domainConfig from './domainConfig.mjs';
|
||||||
export * as effectConfig from './effectConfig.mjs';
|
export * as effectConfig from './effectConfig.mjs';
|
||||||
export * as flagsConfig from './flagsConfig.mjs';
|
export * as flagsConfig from './flagsConfig.mjs';
|
||||||
export * as generalConfig from './generalConfig.mjs';
|
export * as generalConfig from './generalConfig.mjs';
|
||||||
|
export { default as hooksConfig } from './hooksConfig.mjs';
|
||||||
export * as itemConfig from './itemConfig.mjs';
|
export * as itemConfig from './itemConfig.mjs';
|
||||||
export * as settingsConfig from './settingsConfig.mjs';
|
export * as settingsConfig from './settingsConfig.mjs';
|
||||||
export * as systemConfig from './system.mjs';
|
export * as systemConfig from './system.mjs';
|
||||||
|
|
|
||||||
12
module/config/hooksConfig.mjs
Normal file
12
module/config/hooksConfig.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
const systemHooks = {
|
||||||
|
/**
|
||||||
|
* Runs on render of the Daggerheart Sidebar menu.
|
||||||
|
* @param {App} app
|
||||||
|
* @param {Node} contentElement
|
||||||
|
* @param {ApplicationContext} context
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
sidebarMenuRender: 'sidebar-menu-render'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default systemHooks;
|
||||||
|
|
@ -6,7 +6,8 @@ import * as SETTINGS from './settingsConfig.mjs';
|
||||||
import * as EFFECTS from './effectConfig.mjs';
|
import * as EFFECTS from './effectConfig.mjs';
|
||||||
import * as ACTIONS from './actionConfig.mjs';
|
import * as ACTIONS from './actionConfig.mjs';
|
||||||
import * as FLAGS from './flagsConfig.mjs';
|
import * as FLAGS from './flagsConfig.mjs';
|
||||||
import * as ITEMBROWSER from './itemBrowserConfig.mjs'
|
import { default as HOOKS } from './hooksConfig.mjs';
|
||||||
|
import * as ITEMBROWSER from './itemBrowserConfig.mjs';
|
||||||
|
|
||||||
export const SYSTEM_ID = 'daggerheart';
|
export const SYSTEM_ID = 'daggerheart';
|
||||||
|
|
||||||
|
|
@ -20,5 +21,6 @@ export const SYSTEM = {
|
||||||
EFFECTS,
|
EFFECTS,
|
||||||
ACTIONS,
|
ACTIONS,
|
||||||
FLAGS,
|
FLAGS,
|
||||||
|
HOOKS,
|
||||||
ITEMBROWSER
|
ITEMBROWSER
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue