group header
This commit is contained in:
@@ -72,6 +72,8 @@
|
|||||||
"prohibits": "Interdits",
|
"prohibits": "Interdits",
|
||||||
"objectives": "Objectifs",
|
"objectives": "Objectifs",
|
||||||
"relations": "Relations",
|
"relations": "Relations",
|
||||||
|
"morale":"Moral",
|
||||||
|
"morale_level": "Niveau de moral",
|
||||||
"notes": "Notes"
|
"notes": "Notes"
|
||||||
},
|
},
|
||||||
"VERMINE": {
|
"VERMINE": {
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle clickable rolls.
|
* Handle totem pick
|
||||||
* @param {Event} event The originating click event
|
* @param {Event} event The originating click event
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
|
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
|
||||||
import { VermineActorSheet } from "./actor-sheet.mjs";
|
import { VermineActorSheet } from "./actor-sheet.mjs";
|
||||||
|
import { TotemPicker } from "../system/applications.mjs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ActorSheet with some very simple modifications
|
* Extend the basic ActorSheet with some very simple modifications
|
||||||
@@ -129,7 +130,7 @@ export class VermineGroupSheet extends VermineActorSheet {
|
|||||||
/** @override */
|
/** @override */
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
console.log('evenement de groupe');
|
||||||
// Render the item sheet for viewing/editing prior to the editable check.
|
// Render the item sheet for viewing/editing prior to the editable check.
|
||||||
html.find('.item-edit').click(ev => {
|
html.find('.item-edit').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
@@ -152,6 +153,9 @@ export class VermineGroupSheet extends VermineActorSheet {
|
|||||||
li.slideUp(200, () => this.render(false));
|
li.slideUp(200, () => this.render(false));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Choose Totem
|
||||||
|
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
|
||||||
|
|
||||||
// Active Effect management
|
// Active Effect management
|
||||||
html.find(".effect-control").click(ev => onManageActiveEffect(ev, this.actor));
|
html.find(".effect-control").click(ev => onManageActiveEffect(ev, this.actor));
|
||||||
|
|
||||||
@@ -228,4 +232,18 @@ export class VermineGroupSheet extends VermineActorSheet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle totem pick
|
||||||
|
* @param {Event} event The originating click event
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_onTotemButton(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const el = event.currentTarget;
|
||||||
|
// const dataset = el.dataset;
|
||||||
|
|
||||||
|
const totemPicker = new TotemPicker(el, this.actor);
|
||||||
|
totemPicker.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"systems/vermine2047/templates/actor/parts/actor-effects.html",
|
"systems/vermine2047/templates/actor/parts/actor-effects.html",
|
||||||
|
|
||||||
// Group partials
|
// Group partials
|
||||||
|
"systems/vermine2047/templates/actor/parts/group-header.hbs",
|
||||||
"systems/vermine2047/templates/actor/parts/group-vehicles.hbs",
|
"systems/vermine2047/templates/actor/parts/group-vehicles.hbs",
|
||||||
"systems/vermine2047/templates/actor/parts/group-info.hbs",
|
"systems/vermine2047/templates/actor/parts/group-info.hbs",
|
||||||
"systems/vermine2047/templates/actor/parts/group-items.hbs",
|
"systems/vermine2047/templates/actor/parts/group-items.hbs",
|
||||||
|
|||||||
+18
-3
@@ -364,9 +364,20 @@
|
|||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"level": {
|
"level": {
|
||||||
"value": 1,
|
"value": 0,
|
||||||
"min": 1,
|
"min": 0,
|
||||||
"max": 3
|
"max": 3
|
||||||
|
},
|
||||||
|
"reputation": {
|
||||||
|
"value": 10,
|
||||||
|
"min": 2,
|
||||||
|
"max": 10
|
||||||
|
},
|
||||||
|
"morale": {
|
||||||
|
"level": "high",
|
||||||
|
"value": 7,
|
||||||
|
"min": 1,
|
||||||
|
"max": 7
|
||||||
},
|
},
|
||||||
"members": []
|
"members": []
|
||||||
},
|
},
|
||||||
@@ -391,7 +402,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["item", "weapon", "defense", "vehicle", "ability", "specialty", "trait", "background", "trauma", "evolution", "rumor"],
|
"types": ["item", "weapon", "defense", "vehicle", "ability", "specialty", "trait", "background", "trauma", "evolution", "rumor", "target"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"base": {
|
"base": {
|
||||||
"description": "",
|
"description": "",
|
||||||
@@ -451,6 +462,10 @@
|
|||||||
},
|
},
|
||||||
"rumor": {
|
"rumor": {
|
||||||
"templates": ["list"]
|
"templates": ["list"]
|
||||||
|
},
|
||||||
|
"target": {
|
||||||
|
"templates": ["list"],
|
||||||
|
"level":"minor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +1,8 @@
|
|||||||
<form class="{{cssClass}} {{actor.type}} flexcol" autocomplete="off">
|
<form class="{{cssClass}} {{actor.type}} flexcol" autocomplete="off">
|
||||||
|
|
||||||
{{!-- Sheet Header --}}
|
{{!-- Sheet Header --}}
|
||||||
<header class="sheet-header">
|
{{> "systems/vermine2047/templates/actor/parts/group-header.hbs"}}
|
||||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
|
||||||
<div class="header-fields">
|
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
|
|
||||||
{{!-- The grid classes are defined in scss/global/_grid.scss. To use,
|
|
||||||
use both the "grid" and "grid-Ncol" class where "N" can be any number
|
|
||||||
from 1 to 12 and will create that number of columns. --}}
|
|
||||||
<div class="resources grid grid-3col">
|
|
||||||
|
|
||||||
{{!-- "flex-group-center" is also defined in the _grid.scss file
|
|
||||||
and it will add a small amount of padding, a border, and will
|
|
||||||
center all of its child elements content and text. --}}
|
|
||||||
<div class="resource flex-group-center">
|
|
||||||
<label for="system.health.value" class="resource-label">Health</label>
|
|
||||||
<div class="resource-content flexrow flex-center flex-between">
|
|
||||||
<input type="text" name="system.health.value" value="{{system.health.value}}" data-dtype="Number"/>
|
|
||||||
<span> / </span>
|
|
||||||
<input type="text" name="system.health.max" value="{{system.health.max}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="resource flex-group-center">
|
|
||||||
<label for="system.power.value" class="resource-label">Power</label>
|
|
||||||
<div class="resource-content flexrow flex-center flex-between">
|
|
||||||
<input type="text" name="system.power.value" value="{{system.power.value}}" data-dtype="Number"/>
|
|
||||||
<span> / </span>
|
|
||||||
<input type="text" name="system.power.max" value="{{system.power.max}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="resource flex-group-center">
|
|
||||||
<label for="system.cr" class="resource-label">CR / XP</label>
|
|
||||||
<div class="resource-content flexrow flex-center flex-between">
|
|
||||||
<input type="text" name="system.cr" value="{{system.cr}}" data-dtype="Number"/>
|
|
||||||
<span> / </span>
|
|
||||||
<input type="text" disabled="true" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
{{!-- Default tab is specified in actor-sheet.mjs --}}
|
{{!-- Default tab is specified in actor-sheet.mjs --}}
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
<h1 class="char-vermine2047 flexrow flex-group-left w-full">
|
<h1 class="char-vermine2047 flexrow flex-group-left w-full">
|
||||||
<label for="system.identity.totem">{{ localize 'IDENTITY.totem' }}</label>
|
<label for="system.identity.totem">{{ localize 'IDENTITY.totem' }}</label>
|
||||||
{{#if (eq system.identity.totem "")}}
|
{{#if (eq system.identity.totem "")}}
|
||||||
<a name="chooseTotem" class="chooseTotem">Choisissez votre totem</button>
|
<a name="chooseTotem" class="chooseTotem">Choisissez votre totem</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a name="chooseTotem" class="chooseTotem">{{ smarttl "TOTEMS" system.identity.totem }}</button>
|
<a name="chooseTotem" class="chooseTotem">{{ smarttl "TOTEMS" system.identity.totem }}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="reputation flexrow flex-group-center">
|
<div class="reputation flexrow flex-group-center">
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<!-- HEADER -->
|
||||||
|
<header class="char-header grid grid-12col w-full" style="max-height: 110px;">
|
||||||
|
<div class="grid-span-2">
|
||||||
|
<img class="profile-img" src="{{actor.img}}" data-edit="img" width="100" height="100" title="{{actor.name}}" />
|
||||||
|
</div>
|
||||||
|
<section class="char-details grid-span-5">
|
||||||
|
<h1 class="char-name flexrow flex-group-left w-full">
|
||||||
|
<label>{{ localize 'IDENTITY.name' }}</label>
|
||||||
|
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "VERMINE.GroupNamePlaceholder"}}" />
|
||||||
|
</h1>
|
||||||
|
<div class="profile flexrow flex-group-center">
|
||||||
|
<label>{{ localize 'IDENTITY.profile' }}</label>
|
||||||
|
<input name="system.identity.profile" type="text" value="{{system.identity.profile }}" data-dtype="String" />
|
||||||
|
</div>
|
||||||
|
<div class="flexrow flex-group-center w-full">
|
||||||
|
<label for="system.identity.age">{{ localize 'IDENTITY.morale' }}</label>
|
||||||
|
<div class="flexrow row">
|
||||||
|
<input type="number" name="system.identity.age" value="{{ system.morale.value }}" data-dtype="Number" max="7" min="1" />
|
||||||
|
<span id="moraleLevel">({{ system.morale.level }})</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="char-level grid-span-5">
|
||||||
|
<h1 class="char-vermine2047 flexrow flex-group-left w-full">
|
||||||
|
<label for="system.identity.totem">{{ localize 'IDENTITY.totem' }}</label>
|
||||||
|
{{#if (eq system.identity.totem "")}}
|
||||||
|
<a name="chooseTotem" class="chooseTotem">Choisissez…</a>
|
||||||
|
{{ else }}
|
||||||
|
<a name="chooseTotem" class="chooseTotem">{{ smarttl "TOTEMS" system.identity.totem }}</a>
|
||||||
|
{{/if}}
|
||||||
|
</h1>
|
||||||
|
<div class="reputation flexrow flex-group-center">
|
||||||
|
<label>{{ localize 'VERMINE.reputation' }}</label>
|
||||||
|
<input name="system.reputation.value" type="text" value="{{system.reputation.value }}" data-dtype="Number" min="2" max="10" />
|
||||||
|
</div>
|
||||||
|
<div class="experience flexrow flex-group-center">
|
||||||
|
<label>{{ localize 'VERMINE.level' }}</label>
|
||||||
|
<input name="system.level.value" type="text" value="{{system.level.value }}" data-dtype="Number" min="0" max="3" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</header>
|
||||||
Reference in New Issue
Block a user