mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +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 */
|
||||
|
|
|
|||
|
|
@ -2719,6 +2719,10 @@ div.daggerheart.views.multiclass {
|
|||
--secondary-color-fear: rgba(9, 71, 179, 0.75);
|
||||
--shadow-text-stroke: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
|
||||
}
|
||||
#resources {
|
||||
min-height: calc(var(--header-height) + 4rem);
|
||||
min-width: 4rem;
|
||||
}
|
||||
#resources .window-content {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
|
@ -2730,14 +2734,13 @@ div.daggerheart.views.multiclass {
|
|||
}
|
||||
#resources .window-content #resource-fear i {
|
||||
font-size: var(--font-size-18);
|
||||
flex: 1 1 calc(25% - 0.25rem);
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 0.5rem;
|
||||
width: 3rem;
|
||||
background-color: var(--primary-color-fear);
|
||||
-webkit-box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.75);
|
||||
|
|
@ -2812,7 +2815,8 @@ div.daggerheart.views.multiclass {
|
|||
border-color: transparent;
|
||||
}
|
||||
#resources:not(:hover):not(.minimized) header,
|
||||
#resources:not(:hover):not(.minimized) .controls {
|
||||
#resources:not(:hover):not(.minimized) .controls,
|
||||
#resources:not(:hover):not(.minimized) .window-resize-handle {
|
||||
visibility: hidden;
|
||||
}
|
||||
.application.sheet.daggerheart.dh-style.feature .item-sheet-header {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
}
|
||||
|
||||
#resources {
|
||||
min-height: calc(var(--header-height) + 4rem);
|
||||
min-width: 4rem;
|
||||
.window-content {
|
||||
padding: .5rem;
|
||||
#resource-fear {
|
||||
|
|
@ -14,14 +16,14 @@
|
|||
flex-wrap: wrap;
|
||||
i {
|
||||
font-size: var(--font-size-18);
|
||||
flex: 1 1 calc(25% - 0.25rem);
|
||||
// flex: 1 1 calc(25% - 0.25rem);
|
||||
border: 1px solid rgba(0,0,0,.5);
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: .5rem;
|
||||
width: 3rem;
|
||||
background-color: var(--primary-color-fear);
|
||||
-webkit-box-shadow: 0px 0px 5px 1px rgba(0,0,0,.75);
|
||||
box-shadow: 0px 0px 5px 1px rgba(0,0,0,.75);
|
||||
|
|
@ -100,7 +102,7 @@
|
|||
background: transparent;
|
||||
box-shadow: unset;
|
||||
border-color: transparent;
|
||||
header, .controls {
|
||||
header, .controls, .window-resize-handle {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue