Skip to content

Commit

Permalink
Moved all profile image related switches inside a menu. The menu labe…
Browse files Browse the repository at this point in the history
…l doubles as a secret switch for the show/hide.
  • Loading branch information
zeel01 committed Feb 27, 2022
1 parent efd6de1 commit d08fd0c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"HideMaxHP": "Hide maximum hit points",
"ShowCurrentHP": "Show current hit points",
"HideCurrentHP": "Hide current hit points",
"ProfileImage": "Profile Image",
"ShowProfileImage": "Show profile image",
"HideProfileImage": "Hide profile image",
"UseTokenImage": "Use token image",
Expand Down
41 changes: 25 additions & 16 deletions templates/dnd5e/switches.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,33 @@
</ul>
</li>

{{> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
{{#> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
flag=flags.hide-profile-image
control="hide-profile-image"
on="MOBLOKS5E.ShowProfileImage"
off="MOBLOKS5E.HideProfileImage"
}}
{{> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
flag=flags.use-token-image
control="use-token-image"
on="MOBLOKS5E.UseProfileImage"
off="MOBLOKS5E.UseTokenImage"
control="hide-profile-image"
on="MOBLOKS5E.ProfileImage"
off="MOBLOKS5E.ProfileImage"
}}
<ul>
{{> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
flag=flags.hide-profile-image
control="hide-profile-image"
on="MOBLOKS5E.ShowProfileImage"
off="MOBLOKS5E.HideProfileImage"
}}
{{> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
flag=flags.use-token-image
control="use-token-image"
on="MOBLOKS5E.UseProfileImage"
off="MOBLOKS5E.UseTokenImage"
}}
{{#if info.vttatokenizer}}
{{> "modules/monsterblock/templates/dnd5e/parts/trigger.hbs"
control="openTokenizer"
title="MOBLOKS5E.OpenTokenizer"
}}
{{/if}}
</ul>
{{/"modules/monsterblock/templates/dnd5e/parts/switch.hbs"}}

{{#if info.hasLair}}
{{> "modules/monsterblock/templates/dnd5e/parts/switch.hbs"
Expand All @@ -113,12 +128,6 @@
on="MOBLOKS5E.HideBio"
off="MOBLOKS5E.ShowBio"
}}
{{#if info.vttatokenizer}}
{{> "modules/monsterblock/templates/dnd5e/parts/trigger.hbs"
control="openTokenizer"
title="MOBLOKS5E.OpenTokenizer"
}}
{{/if}}
{{> "modules/monsterblock/templates/dnd5e/parts/trigger.hbs"
control="resetDefaults"
title="MOBLOKS5E.resetDefaults.label"
Expand Down

0 comments on commit d08fd0c

Please sign in to comment.