mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +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 */
|
||||
async _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 flagsConfig from './flagsConfig.mjs';
|
||||
export * as generalConfig from './generalConfig.mjs';
|
||||
export { default as hooksConfig } from './hooksConfig.mjs';
|
||||
export * as itemConfig from './itemConfig.mjs';
|
||||
export * as settingsConfig from './settingsConfig.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 ACTIONS from './actionConfig.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';
|
||||
|
||||
|
|
@ -20,5 +21,6 @@ export const SYSTEM = {
|
|||
EFFECTS,
|
||||
ACTIONS,
|
||||
FLAGS,
|
||||
HOOKS,
|
||||
ITEMBROWSER
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue