From a448f68190203615d42e1c6da16f4c13dff27546 Mon Sep 17 00:00:00 2001 From: raphaelpieroni Date: Thu, 13 May 2021 00:38:06 +0200 Subject: [PATCH] Align skills and hide controls --- module/actor-sheet.js | 7 ++++- styles/simple.css | 31 ++++++++++++++++++- templates/actor-sheet-competence-partial.html | 8 ++--- templates/actor-sheet.html | 15 +++++---- 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 441e0222..0eb85585 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -30,7 +30,8 @@ export class RdDActorSheet extends ActorSheet { dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }], editCaracComp: false, showCompNiveauBase: false, - montrerArchetype: false + montrerArchetype: false, + hideControls: true }); } @@ -483,6 +484,10 @@ export class RdDActorSheet extends ActorSheet { this.options.montrerArchetype = !this.options.montrerArchetype; this.render(true); }); + html.find('.lock-unlock-controls').click((event) => {console.log("CONTROLS",this.options.hideControls) + this.options.hideControls = !this.options.hideControls; + this.render(true); + }); // On pts de reve change html.find('.pointsreve-value').change((event) => { diff --git a/styles/simple.css b/styles/simple.css index 69aa3110..6935a4a1 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -429,6 +429,13 @@ table {border: 1px solid #7a7971;} text-align: right; } +.competence-list .item-controls { + display: contents !important; +} +.competence-list .item-controls.hidden-controls { + display: none !important; +} + .rdddialog .dialog-roll-sort s{ width: 600px; height: 430px; @@ -612,8 +619,27 @@ section.sheet-body:after { } .window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp { + flex-grow: 0; margin: 0.05rem; - flex-basis: 3rem; + flex-basis: 2rem; + text-align: center; +} +.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-value { + flex-grow: 0; + margin: 0.05rem; + flex-basis: 2rem; + text-align: center; +} +.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-archetype { + flex-grow: 0; + margin: 0.05rem; + flex-basis: 2rem; + text-align: center; +} +.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp-sort { + flex-grow: 0; + margin: 0.05rem; + flex-basis: 2rem; text-align: center; } @@ -684,6 +710,8 @@ ul, li { border-radius: 0.25rem; padding: 0.125rem; flex: 1 1 5rem; + display: flex !important; + align-items: baseline !important; } .table-row { @@ -734,6 +762,7 @@ ul, li { height: 24px; flex-grow: 0; margin-right: 0.25rem; + vertical-align: bottom; } .competence-column { flex-direction: column; diff --git a/templates/actor-sheet-competence-partial.html b/templates/actor-sheet-competence-partial.html index 4022579d..ec217cf9 100644 --- a/templates/actor-sheet-competence-partial.html +++ b/templates/actor-sheet-competence-partial.html @@ -15,10 +15,6 @@ value="{{numberFormat data.xp_sort decimals=0 sign=false}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/> {{/if}} -
- - -
{{#if @root.options.montrerArchetype}} Vous pouvez dépenser {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}} {{/if}} +
+ + +
{{/if}} \ No newline at end of file diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 60a3acf0..1bdd8fe9 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -113,7 +113,7 @@