mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-13 08:08:10 +02:00
Improved handling so that modules changing the game pause work normally
This commit is contained in:
parent
47a852754c
commit
9f3ffdbdbb
2 changed files with 16 additions and 3 deletions
|
|
@ -1,9 +1,22 @@
|
|||
export default class DhGamePause extends foundry.applications.ui.GamePause {
|
||||
async _onRender(context, options) {
|
||||
await super._onRender(context, options);
|
||||
|
||||
/* Avoid altering the styling if a module has subscribed to the renderGamePause hook */
|
||||
if (!Hooks.events.renderGamePause?.length) {
|
||||
this.element.classList.add('dh-style');
|
||||
}
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext(options) {
|
||||
const context = await super._prepareContext(options);
|
||||
context.spin = false;
|
||||
context.icon = 'systems/daggerheart/assets/logos/compatible_with_DH_logos-10.png';
|
||||
|
||||
/* Avoid altering the gamepause context if a module has subscribed to the renderGamePause hook */
|
||||
if (!Hooks.events.renderGamePause?.length) {
|
||||
context.spin = options.spin ?? false;
|
||||
context.icon = options.icon ?? 'systems/daggerheart/assets/logos/compatible_with_DH_logos-10.png';
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@import '../../utils/mixin.less';
|
||||
|
||||
#pause.paused {
|
||||
#pause.dh-style {
|
||||
figcaption {
|
||||
position: absolute;
|
||||
margin-top: 24px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue