mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
Make Fear Panel resizable
This commit is contained in:
parent
e454d8bb06
commit
3d949d6375
3 changed files with 22 additions and 10 deletions
|
|
@ -17,18 +17,24 @@ export default class Resources extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
/** @inheritDoc */
|
||||
static DEFAULT_OPTIONS = {
|
||||
id: "resources",
|
||||
classes: ["flexcol"],
|
||||
classes: [],
|
||||
tag: "div",
|
||||
window: {
|
||||
frame: true,
|
||||
title: "Fear",
|
||||
positioned: true
|
||||
positioned: true,
|
||||
resizable: true
|
||||
},
|
||||
actions: {
|
||||
setFear: Resources.setFear,
|
||||
increaseFear: Resources.increaseFear
|
||||
},
|
||||
position: {}
|
||||
position: {
|
||||
width: 222,
|
||||
height: 222,
|
||||
// top: "200px",
|
||||
// left: "120px"
|
||||
}
|
||||
};
|
||||
|
||||
/** @override */
|
||||
|
|
@ -65,7 +71,7 @@ export default class Resources extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
|
||||
/** @override */
|
||||
async _preFirstRender(context, options) {
|
||||
options.position = game.user.getFlag(SYSTEM.id, 'app.resources.position') ?? {};
|
||||
options.position = game.user.getFlag(SYSTEM.id, 'app.resources.position') ?? Resources.DEFAULT_OPTIONS.position;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue