RC-71 | Glory | Display & Input
This commit is contained in:
parent
05f111682e
commit
31a47a99dd
5 changed files with 67 additions and 13 deletions
|
|
@ -31,6 +31,35 @@
|
||||||
{{rc-options fate.selected fate.options localize=true}}
|
{{rc-options fate.selected fate.options localize=true}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
{{#if meta.editable}}
|
||||||
|
<label
|
||||||
|
for="{{meta.idp}}-glory"
|
||||||
|
class="glory-label col-header"
|
||||||
|
>
|
||||||
|
{{ rc-i18n "RipCrypt.common.glory" }}
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="{{meta.idp}}-glory"
|
||||||
|
type="number"
|
||||||
|
class="glory row-alt"
|
||||||
|
name="system.level.glory"
|
||||||
|
value="{{level.glory}}"
|
||||||
|
min="0"
|
||||||
|
>
|
||||||
|
{{else}}
|
||||||
|
<div
|
||||||
|
id="{{meta.idp}}-glory-label"
|
||||||
|
class="glory-label label col-header"
|
||||||
|
>
|
||||||
|
{{ rc-i18n "RipCrypt.common.glory" }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="glory row-alt input"
|
||||||
|
aria-describedby="{{meta.idp}}-glory-label"
|
||||||
|
>
|
||||||
|
{{ level.glory }}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{!-- * Weapons --}}
|
{{!-- * Weapons --}}
|
||||||
<table class="weapons">
|
<table class="weapons">
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,15 @@
|
||||||
padding-left: var(--col-gap);
|
padding-left: var(--col-gap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.glory-label {
|
||||||
|
grid-column: 2 / span 1;
|
||||||
|
grid-row: 4 / span 1;
|
||||||
|
}
|
||||||
|
.glory {
|
||||||
|
grid-column: 2 / span 1;
|
||||||
|
grid-row: 5 / span 1;
|
||||||
|
}
|
||||||
|
|
||||||
.fate {
|
.fate {
|
||||||
grid-column: 1 / span 1;
|
grid-column: 1 / span 1;
|
||||||
grid-row: 4 / span 2;
|
grid-row: 4 / span 2;
|
||||||
|
|
@ -114,6 +123,7 @@
|
||||||
background: none;
|
background: none;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .roll {
|
> .roll {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,18 @@
|
||||||
.ripcrypt > .window-content input {
|
.ripcrypt > .window-content {
|
||||||
all: revert;
|
input, .input {
|
||||||
box-sizing: border-box;
|
all: revert;
|
||||||
border: none;
|
box-sizing: border-box;
|
||||||
outline: none;
|
border: none;
|
||||||
font-family: inherit;
|
outline: none;
|
||||||
font-size: inherit;
|
font-family: inherit;
|
||||||
position: relative;
|
font-size: inherit;
|
||||||
background: none;
|
position: relative;
|
||||||
|
background: none;
|
||||||
|
padding: 2px 4px;
|
||||||
|
|
||||||
&[type="text"],
|
&[type="text"],
|
||||||
&[type="number"] {
|
&[type="number"] {
|
||||||
border-bottom: 2px dashed purple;
|
border-bottom: 2px dashed purple;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@
|
||||||
},
|
},
|
||||||
"wear": "Wear",
|
"wear": "Wear",
|
||||||
"damage": "Damage",
|
"damage": "Damage",
|
||||||
"guts": "Guts"
|
"guts": "Guts",
|
||||||
|
"glory": "Glory"
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
"abbrAccess": {
|
"abbrAccess": {
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ export class HeroSummaryCardV1 extends GenericSheetMixin(HandlebarsApplicationMi
|
||||||
ctx = await HeroSummaryCardV1.prepareFatePath(ctx);
|
ctx = await HeroSummaryCardV1.prepareFatePath(ctx);
|
||||||
ctx = await HeroSummaryCardV1.prepareAbilityRow(ctx);
|
ctx = await HeroSummaryCardV1.prepareAbilityRow(ctx);
|
||||||
ctx = await HeroSummaryCardV1.prepareSpeed(ctx);
|
ctx = await HeroSummaryCardV1.prepareSpeed(ctx);
|
||||||
|
ctx = await HeroSummaryCardV1.prepareLevelData(ctx);
|
||||||
|
|
||||||
partId = partId.slice(0,1).toUpperCase() + partId.slice(1);
|
partId = partId.slice(0,1).toUpperCase() + partId.slice(1);
|
||||||
if (this[`_prepare${partId}Context`] != null) {
|
if (this[`_prepare${partId}Context`] != null) {
|
||||||
|
|
@ -62,6 +63,16 @@ export class HeroSummaryCardV1 extends GenericSheetMixin(HandlebarsApplicationMi
|
||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static async prepareLevelData(ctx) {
|
||||||
|
ctx.level = {
|
||||||
|
glory: ctx.actor.system.level.glory,
|
||||||
|
};
|
||||||
|
if (ctx.meta.limited) {
|
||||||
|
ctx.level.glory = `?`;
|
||||||
|
};
|
||||||
|
return ctx;
|
||||||
|
};
|
||||||
|
|
||||||
static async prepareFatePath(ctx) {
|
static async prepareFatePath(ctx) {
|
||||||
ctx.fate = {};
|
ctx.fate = {};
|
||||||
ctx.fate.selected = ctx.actor.system.fate;
|
ctx.fate.selected = ctx.actor.system.fate;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue