Ajout d'icônes pour les filtres/locks

This commit is contained in:
Vincent Vandemeulebrouck 2020-12-15 19:45:46 +01:00
parent bdea0c5b8d
commit 398f1af132
7 changed files with 264 additions and 3 deletions

59
icons/filter.svg Normal file
View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="12.5243mm"
height="11.2895mm"
viewBox="0 0 71 64"
version="1.1"
id="svg3"
sodipodi:docname="filter.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata9">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1818"
inkscape:window-height="1345"
id="namedview5"
showgrid="false"
inkscape:zoom="13.039316"
inkscape:cx="23.667968"
inkscape:cy="21.334489"
inkscape:window-x="460"
inkscape:window-y="29"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
inkscape:document-rotation="0" />
<path
id="Sélection"
fill="none"
stroke="black"
stroke-width="1"
d="M 0,0 C 0,0 71,0 71,0 71,3.03 71.33,7.3 69.98,10 67.09,15.77 46.75,31.08 43.6,36 40.85,40.31 42,56.23 42,62 42,62 29,61 29,61 29,55.3 30.14,40.33 27.4,36 27.4,36 8,16 8,16 5.59,13.59 1.77,10.18 0.6,7 -0.12,5.05 0.01,2.1 0,0 Z m 52,15 c 0,0 -12,1 -12,1 0,0 -18,0 -18,0 1.31,4.38 11.04,15.49 16,13.84 C 42.71,28.26 50.6,19.77 52,15 Z"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

60
icons/locked.svg Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="24"
viewBox="0 0 74.999964 74.999964"
version="1.1"
id="svg3"
sodipodi:docname="locked.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata9">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3840"
inkscape:window-height="2066"
id="namedview5"
showgrid="false"
inkscape:zoom="11.84917"
inkscape:cx="66.242132"
inkscape:cy="3.3681778"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
inkscape:document-rotation="0"
units="px" />
<path
id="Sélection #1"
fill="none"
stroke="#000000"
stroke-width="0.43031"
d="m 17.920882,31.968974 c -0.275398,-1.686814 -0.02152,-6.407314 0.253883,-8.175887 1.613662,-10.314528 8.033886,-24.37275369 20.400992,-23.77462269 11.489274,0.5551 17.423247,13.45579069 19.041212,23.34431269 0.309823,1.919182 0.619646,6.773077 0.322733,8.606197 0,0 4.303099,0 4.303099,0 0,0 0,43.030993 0,43.030993 0,0 -49.485638,0 -49.485638,0 0,0 0,-43.030993 0,-43.030993 0,0 5.163719,0 5.163719,0 z m 36.146031,0 c 0,-7.517513 -1.080078,-14.703688 -5.38748,-21.085184 C 46.23097,7.2562774 43.124132,4.5453244 38.575757,4.4334444 26.699204,4.1451364 21.810883,19.614778 21.793671,29.387115 c 0,0 0,2.581859 0,2.581859 0,0 32.273242,0 32.273242,0 z"
style="fill:#000000;fill-opacity:1;stroke:#1a1a1a;stroke-opacity:1;opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

63
icons/no-filter.svg Normal file
View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="12.5243mm"
height="11.2895mm"
viewBox="0 0 71 64"
version="1.1"
id="svg3"
sodipodi:docname="no-filter.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata9">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1818"
inkscape:window-height="1345"
id="namedview5"
showgrid="false"
inkscape:zoom="23.294527"
inkscape:cx="23.667968"
inkscape:cy="14.465922"
inkscape:window-x="630"
inkscape:window-y="276"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
inkscape:document-rotation="0" />
<path
id="Sélection"
fill="none"
stroke="black"
stroke-width="1"
d="M 0.00,0.00 C 0.00,0.00 71.00,0.00 71.00,0.00 71.00,3.03 71.33,7.30 69.98,10.00 67.09,15.77 46.75,31.08 43.60,36.00 40.85,40.31 42.00,56.23 42.00,62.00 42.00,62.00 29.00,61.00 29.00,61.00 29.00,55.30 30.14,40.33 27.40,36.00 27.40,36.00 8.00,16.00 8.00,16.00 5.59,13.59 1.77,10.18 0.60,7.00 -0.12,5.05 0.01,2.10 0.00,0.00 Z M 52.00,15.00 C 52.00,15.00 40.00,16.00 40.00,16.00 40.00,16.00 22.00,16.00 22.00,16.00 23.31,20.38 33.04,31.49 38.00,29.84 42.71,28.26 50.60,19.77 52.00,15.00 Z"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" />
<path
style="fill:#6c0000;stroke:#6c0000;stroke-width:1.49992px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.5;fill-opacity:1"
d="M 47.004186,-2.0604574 10.753012,51.897773 14.551981,55.052848 56.920138,-6.3101511 52.090941,-8.4993871 Z"
id="path834" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

64
icons/unlocked.svg Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="26.240078"
height="24.137722"
viewBox="0 0 82.000206 75.430344"
version="1.1"
id="svg3"
sodipodi:docname="unlocked.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata9">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1818"
inkscape:window-height="1345"
id="namedview5"
showgrid="false"
inkscape:zoom="9.407583"
inkscape:cx="32.22484"
inkscape:cy="24.325892"
inkscape:window-x="630"
inkscape:window-y="276"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
inkscape:document-rotation="0"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<path
id="Sélection #1"
fill="none"
stroke="#000000"
stroke-width="0.430321"
d="m 41.525985,32.183078 c -0.757365,-3.180073 0.619662,-10.938762 1.600794,-14.200596 1.097319,-3.636213 2.990736,-7.836147 5.422046,-10.7580268 1.36842,-1.639523 3.63191,-3.85998 5.45647,-4.957299 2.39689,-1.44587897 5.38332,-2.17312097 8.1761,-2.03541897 9.56174,0.460444 15.50017,9.83713977 17.88845,18.18106577 1.04138,3.636213 1.32539,5.723271 1.4717,9.467064 0.0645,0.933797 0.50347,2.891758 0,3.614697 -0.667,0.890765 -2.86164,0.688514 -3.86859,0.688514 0,-7.620987 -1.35551,-15.23767 -5.99007,-21.516054 -2.30652,-3.1198278 -5.46077,-5.8308508 -9.50149,-6.0072828 -4.9573,-0.21516 -8.35253,2.543198 -11.09798,6.4376038 -4.39788,6.239655 -5.684541,13.615359 -5.684541,21.085733 0,0 4.303211,0 4.303211,0 0,0 0,43.032105 0,43.032105 0,0 -49.4869245,0 -49.4869245,0 0,0 0,-43.032105 0,-43.032105 0,0 41.3108245,0 41.3108245,0 z"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:0.5" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -32,9 +32,11 @@ export class RdDActorSheet extends ActorSheet {
// Gestion du lock/unlock des zones éditables (carac+compétences) // Gestion du lock/unlock des zones éditables (carac+compétences)
data.data.editCaracComp = this.options.editCaracComp; data.data.editCaracComp = this.options.editCaracComp;
data.data.lockUnlockText = (this.options.editCaracComp) ? "Bloquer" : "Débloquer"; data.data.lockUnlockText = (this.options.editCaracComp) ? "Bloquer" : "Débloquer";
data.data.lockUnlockIcon = (this.options.editCaracComp) ? "unlocked.svg" : "locked.svg";
// Gestion de l'affichage total/partiel des compétences // Gestion de l'affichage total/partiel des compétences
data.data.cacherCompetencesNiveauBase = this.options.cacherCompetencesNiveauBase; data.data.cacherCompetencesNiveauBase = this.options.cacherCompetencesNiveauBase;
data.data.showHideCompetenceText = (this.options.cacherCompetencesNiveauBase) ? "Montrer tout" : "Filtrer" ; data.data.showHideCompetenceText = (this.options.cacherCompetencesNiveauBase) ? "Montrer tout" : "Filtrer" ;
data.data.showHideCompetenceIcon = (this.options.cacherCompetencesNiveauBase) ? "no-filter.svg" : "filter.svg";
let compCategorieNiveau = RdDUtility.getLevelCategory(); // recup catégorie let compCategorieNiveau = RdDUtility.getLevelCategory(); // recup catégorie
data.itemsByType = RdDUtility.buildItemsClassification(data.items); data.itemsByType = RdDUtility.buildItemsClassification(data.items);

View File

@ -238,6 +238,19 @@ table {border: 1px solid #7a7971;}
height: 8%; height: 8%;
border-width: 0; border-width: 0;
} }
.small-button-container {
height: 16px;
border: 0;
}
.small-button-container img {
max-height: 100%;
max-width: 100%;
}
.small-button-img {
max-height: 24;
border-width: 0;
}
.foundryvtt-reve-de-dragon .sheet-header .header-fields { .foundryvtt-reve-de-dragon .sheet-header .header-fields {
-webkit-box-flex: 1; -webkit-box-flex: 1;

View File

@ -98,7 +98,7 @@
<div class="tab items" data-group="primary" data-tab="carac"> <div class="tab items" data-group="primary" data-tab="carac">
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol"> <div class="flex-group-left flexcol">
<span><a class="lock-unlock-sheet">{{data.lockUnlockText}}</a></span> <span><a class="lock-unlock-sheet"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.lockUnlockIcon}}" alt="blocker/débloquer">{{data.lockUnlockText}}</a></span>
<ul class="carac-list alterne-list"> <ul class="carac-list alterne-list">
{{#each data.carac as |carac key|}} {{#each data.carac as |carac key|}}
<li class="competence flexrow list-item" data-attribute="{{key}}"> <li class="competence flexrow list-item" data-attribute="{{key}}">
@ -162,8 +162,8 @@
{{!-- Compétences Tab --}} {{!-- Compétences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences"> <div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow"> <div class="flexrow">
<span><a class="lock-unlock-sheet">{{data.lockUnlockText}}</a></span> <span><a class="lock-unlock-sheet"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.lockUnlockIcon}}" alt="blocker/débloquer">{{data.lockUnlockText}}</a></span>
<span><a class="show-hide-competences">{{data.showHideCompetenceText}}</a></span> <span><a class="show-hide-competences"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.showHideCompetenceIcon}}" alt="filter/montrer tout">{{data.showHideCompetenceText}}</a></span>
</div> </div>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol competence-column"> <div class="flex-group-left flexcol competence-column">