RC-37 | Abilities | Move & Run Display
This commit is contained in:
parent
7095d0d3f8
commit
a9cc3244df
4 changed files with 60 additions and 6 deletions
|
|
@ -68,8 +68,18 @@
|
|||
{{/each}}
|
||||
|
||||
{{!-- Health --}}
|
||||
<div></div>
|
||||
|
||||
{{!-- Move & Run --}}
|
||||
<div class="ability">
|
||||
<div class="compass dual">
|
||||
<span class="value">{{speed.move}}</span>
|
||||
<span class="max">{{speed.run}}</span>
|
||||
</div>
|
||||
<div aria-hidden="true" class="col-header label">
|
||||
{{rc-i18n "RipCrypt.Apps.HeroSummaryCardV1.move-run"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- * Equipment --}}
|
||||
|
|
|
|||
|
|
@ -60,13 +60,13 @@
|
|||
/* grid-template-rows: minmax(0, 3fr) minmax(0, 1fr); */
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
|
||||
}
|
||||
|
||||
.ability {
|
||||
display: grid;
|
||||
grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
label, .label {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
|
@ -90,5 +90,36 @@
|
|||
width: 70%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.dual {
|
||||
position: relative;
|
||||
font-size: 1rem;
|
||||
--distance-from-edge: 3px;
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 69%;
|
||||
height: 2px;
|
||||
background: black;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
> .value,
|
||||
> .max {
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
> .value {
|
||||
top: var(--distance-from-edge);
|
||||
left: var(--distance-from-edge);
|
||||
}
|
||||
> .max {
|
||||
bottom: var(--distance-from-edge);
|
||||
right: var(--distance-from-edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
},
|
||||
"common": {
|
||||
"empty": "---",
|
||||
"move": "Move",
|
||||
"run": "Run",
|
||||
"fate": {
|
||||
"North": "North",
|
||||
"East": "East",
|
||||
|
|
@ -28,6 +30,11 @@
|
|||
"name": "Abbreviate Access Names",
|
||||
"hint": "Shortens the Access level names the way the book does. (e.g. \"Common\" becomes \"C\")"
|
||||
}
|
||||
},
|
||||
"Apps": {
|
||||
"HeroSummaryCardV1": {
|
||||
"move-run": "@RipCrypt.common.move • @RipCrypt.common.run"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export class HeroSummaryCardV1 extends HandlebarsApplicationMixin(ActorSheetV2)
|
|||
|
||||
ctx = await this.prepareFatePath(ctx);
|
||||
ctx = await this.prepareAbilityRow(ctx);
|
||||
ctx = await this.prepareSpeed(ctx);
|
||||
|
||||
partId = partId.slice(0,1).toUpperCase() + partId.slice(1);
|
||||
if (this[`_prepare${partId}Context`] != null) {
|
||||
|
|
@ -84,6 +85,11 @@ export class HeroSummaryCardV1 extends HandlebarsApplicationMixin(ActorSheetV2)
|
|||
};
|
||||
return ctx;
|
||||
};
|
||||
|
||||
async prepareSpeed(ctx) {
|
||||
ctx.speed = ctx.actor.system.speed;
|
||||
return ctx;
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Actions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue