Skip to content

Commit

Permalink
Added Icon Color classes to npcview
Browse files Browse the repository at this point in the history
  • Loading branch information
WBHarry committed Oct 17, 2024
1 parent fb8f9d4 commit c9becf2
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 24 deletions.
36 changes: 29 additions & 7 deletions BestiaryTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -8910,7 +8910,10 @@ class BestiaryDisplayMenu extends HandlebarsApplicationMixin$7(
this.settings = {
hideWelcome: game.settings.get("pf2e-bestiary-tracking", "hide-welcome"),
hideTips: game.settings.get("pf2e-bestiary-tracking", "hide-tips"),
sectionsPosition: game.settings.get("pf2e-bestiary-tracking", "sections-position"),
sectionsPosition: game.settings.get(
"pf2e-bestiary-tracking",
"sections-position",
),
hideAbilityDescriptions: game.settings.get(
"pf2e-bestiary-tracking",
"hide-ability-descriptions",
Expand Down Expand Up @@ -9013,7 +9016,20 @@ class BestiaryDisplayMenu extends HandlebarsApplicationMixin$7(
).length;

context.toBestiaryOptions = toBestiaryOptions;
context.positionOptions = [{ value: 'top', name: 'PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Top' }, { value: 'center', name: 'PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Center'}, { value: 'bottom', name: 'PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Bottom' }];
context.positionOptions = [
{
value: "top",
name: "PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Top",
},
{
value: "center",
name: "PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Center",
},
{
value: "bottom",
name: "PF2EBestiary.Menus.BestiaryDisplay.PositionOptions.Bottom",
},
];

return context;
}
Expand Down Expand Up @@ -9115,9 +9131,9 @@ class BestiaryDisplayMenu extends HandlebarsApplicationMixin$7(
this.settings.hideTips,
);
await game.settings.set(
"pf2e-bestiary-tracking",
"pf2e-bestiary-tracking",
"sections-position",
this.settings.sectionsPosition
this.settings.sectionsPosition,
);
await game.settings.set(
"pf2e-bestiary-tracking",
Expand Down Expand Up @@ -10065,7 +10081,7 @@ const bestiaryDisplay = () => {
scope: "world",
config: false,
type: String,
default: 'top',
default: "top",
});

game.settings.register(
Expand Down Expand Up @@ -14999,8 +15015,14 @@ class PF2EBestiary extends HandlebarsApplicationMixin(
"use-token-art",
);
context.hideTips = game.settings.get("pf2e-bestiary-tracking", "hide-tips");
context.hideWelcome = game.settings.get("pf2e-bestiary-tracking", "hide-welcome");
context.sectionsPositioning = game.settings.get("pf2e-bestiary-tracking", 'sections-position');
context.hideWelcome = game.settings.get(
"pf2e-bestiary-tracking",
"hide-welcome",
);
context.sectionsPositioning = game.settings.get(
"pf2e-bestiary-tracking",
"sections-position",
);
context.hideAbilityDescriptions = game.settings.get(
"pf2e-bestiary-tracking",
"hide-ability-descriptions",
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/hazardView.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
<div class="data-section full primary-container active">
<div class="data-header primary-container">
<div class="data-header-label">
<i class="fa-solid fa-brain"></i>
<i class="fa-solid fa-brain secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.Miscellaneous.RecallKnowledgeAttempts"}}</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/monsterView.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<div class="data-section full primary-container active">
<div class="data-header primary-container">
<div class="data-header-label">
<i class="fa-solid fa-brain"></i>
<i class="fa-solid fa-brain secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.Miscellaneous.RecallKnowledgeAttempts"}}</div>
</div>
</div>
Expand Down
24 changes: 12 additions & 12 deletions templates/partials/npcView.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
{{> "modules/pf2e-bestiary-tracking/templates/partials/toggleInputSection.hbs" icon="fa-solid fa-left-right" title="PF2EBestiary.Bestiary.NPC.Weight" editMode=this.npcState.editMode path="system.npcData.general.weight" data=this.general.weight }}
{{/if}}
<div class="flexcol flex1 data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header secondary-container">
<div class="data-header-label">
<i class="fa-solid fa-chart-column"></i>
<i class="fa-solid fa-chart-column secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Dispositions"}}</div>
</div>
</div>
Expand All @@ -40,7 +40,7 @@
<div class="data-section full primary-container active">
<div class="data-header primary-container">
<div class="data-header-label">
<i class="fa-solid fa-brain"></i>
<i class="fa-solid fa-brain secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.Miscellaneous.RecallKnowledgeAttempts"}}</div>
</div>
</div>
Expand Down Expand Up @@ -78,7 +78,7 @@
<div class="data-section primary-container npc-players-container active">
<div class="data-header primary-container" title="{{localize "PF2EBestiary.Bestiary.NPC.GMPlayersContainerTip"}}">
<div class="data-header-label">
<i class="fa-solid fa-person-burst"></i>
<i class="fa-solid fa-person-burst secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.GMPlayersContainerTitle"}}</div>
</div>
</div>
Expand All @@ -101,7 +101,7 @@
<div class="flexcol flex1 data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label {{#if this.user.isGM}}{{PF2EBTToggleContainer this.user this.influence.premise}}{{/if}}" style="{{PF2EBTToggleContainerOverride this.contrastRevealedState this.influence.premise}}" data-action="toggleRevealed" data-path="system.npcData.influence.premise">
<i class="fa-solid fa-chart-column"></i>
<i class="fa-solid fa-chart-column secondary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.PremiseLabel"}}</div>
</div>
</div>
Expand Down Expand Up @@ -188,7 +188,7 @@
<div class="flexcol flex1 data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label {{#if this.user.isGM}}{{PF2EBTToggleContainer this.user this.general.background}}{{/if}}" style="{{PF2EBTToggleContainerOverride this.contrastRevealedState this.general.background}}" data-action="toggleRevealed" data-path="system.npcData.general.background">
<i class="header-icon fa-solid fa-house-chimney"></i>
<i class="header-icon fa-solid fa-house-chimney primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Background"}}</div>
</div>

Expand Down Expand Up @@ -216,7 +216,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label primary-hover-container" data-action="toggleAllRevealed" data-path="system.npcData.influence.discovery">
<i class="header-icon fa-solid fa-brain"></i>
<i class="header-icon fa-solid fa-brain primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Discovery"}}</div>
</div>
{{#if this.npcState.editMode}}<i class="fa-solid fa-plus primary-hover-container" data-action="addInfluence" data-type="discovery"></i>{{/if}}
Expand Down Expand Up @@ -256,7 +256,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label primary-hover-container" data-action="toggleAllRevealed" data-path="system.npcData.influence.influenceSkills">
<i class="header-icon fa-solid fa-book"></i>
<i class="header-icon fa-solid fa-book primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.InfluenceSkills"}}</div>
</div>
{{#if this.npcState.editMode}}<i class="fa-solid fa-plus primary-hover-container" data-action="addInfluence" data-type="influenceSkills"></i>{{/if}}
Expand Down Expand Up @@ -319,7 +319,7 @@
<div class="data-header primary-container">
<div class="data-header-label">
<div class="data-header-label">
<i class="header-icon fa-solid fa-hand-holding-heart"></i>
<i class="header-icon fa-solid fa-hand-holding-heart primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Influence"}}</div>
</div>
<div class="influence-points-container">
Expand Down Expand Up @@ -368,7 +368,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label primary-hover-container" data-action="toggleAllRevealed" data-path="system.npcData.influence.weaknesses">
<i class="header-icon fa-solid fa-fw fa-heart-broken"></i>
<i class="header-icon fa-solid fa-fw fa-heart-broken primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Weaknesses"}}</div>
</div>
{{#if this.npcState.editMode}}<i class="fa-solid fa-plus primary-hover-container" data-action="addInfluence" data-type="weakness"></i>{{/if}}
Expand Down Expand Up @@ -412,7 +412,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label primary-hover-container" data-action="toggleAllRevealed" data-path="system.npcData.influence.resistances">
<i class="fa-solid fa-fw fa-shield-virus"></i>
<i class="fa-solid fa-fw fa-shield-virus primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Resistances"}}</div>
</div>
{{#if this.npcState.editMode}}<i class="fa-solid fa-plus primary-hover-container" data-action="addInfluence" data-type="resistance"></i>{{/if}}
Expand Down Expand Up @@ -456,7 +456,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label primary-hover-container" data-action="toggleAllRevealed" data-path="system.npcData.influence.penalties">
<i class="fa-solid fa-handcuffs"></i>
<i class="fa-solid fa-handcuffs primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Penalties"}}</div>
</div>
{{#if this.npcState.editMode}}<i class="fa-solid fa-plus primary-hover-container" data-action="addInfluence" data-type="penalty"></i>{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/pcPersonality.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label {{#if this.user.isGM}}primary-hover-container{{/if}}" data-action="toggleAllRevealed" data-path="system.npcData.general.personality" data-type="personality">
<i class="header-icon fa-solid fa-user"></i>
<i class="header-icon fa-solid fa-user primary-icon"></i>
<div class="flex-value">{{localize "PF2EBestiary.Bestiary.NPC.Personality"}}</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/toggleInputSection.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="data-header primary-container {{PF2EBTToggleContainer this.user data}}" style="{{PF2EBTToggleContainerOverride this.contrastRevealedState data}}" data-action="toggleRevealed" data-path="{{path}}">
<div class="data-header-label full">
<div class="data-header-label">
<i class="header-icon {{icon}}"></i>
<i class="header-icon primary-icon {{icon}}"></i>
<div class="flex-value">{{localize title}}</div>
</div>
{{#if (and (not this.noEdit) (and this.user.isGM editMode))}}
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/toggleTextSection.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flexcol data-section primary-container active">
<div class="data-header primary-container">
<div class="data-header-label {{#if this.user.isGM}}{{PF2EBTToggleContainer this.user data}}{{/if}}" style="{{PF2EBTToggleContainerOverride this.contrastRevealedState data}}" data-action="toggleRevealed" data-path="{{path}}">
<i class="header-icon {{icon}}"></i>
<i class="header-icon primary-icon {{icon}}"></i>
<div class="flex-value">{{localize title}}</div>
</div>
</div>
Expand Down

0 comments on commit c9becf2

Please sign in to comment.