All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
3.5 KiB

1 year ago
  1. {{#*inline "tokenListItem"}}
  2. <label data-token-id="{{this.token.id}}" data-actor-name="{{this.actor.name}}" data-xp-amount="{{this.actor.data.data.details.xp.value}}">
  3. <input type="checkbox" name="{{this.token.id}}" {{#if isChecked}}checked="checked"{{/if}}>
  4. <div class="give-xp--actor-icon" style="background-image: url({{this.img}})"></div>
  5. <span class="give-xp--actor-xp">+0 XP</span>
  6. </label>
  7. {{/inline}}
  8. <form>
  9. <h2>{{ localize "WORDS.Configuration" }}</h2>
  10. <div class="form-group">
  11. <label for="xp-modifier">{{ localize "GIVE_XP.DistributeForm.XPModifier" }}</label>
  12. <input id="xp-modifier" type="number" value="{{xpModifier}}">
  13. </div>
  14. <nav class="tabs">
  15. <a class="item active" data-tab="friendlies">
  16. <i class="fas fa-users"></i>
  17. {{ localize "GIVE_XP.DistributeForm.Friendlies" }}
  18. </a>
  19. <a class="item" data-tab="hostiles">
  20. <i class="fas fa-skull"></i>
  21. {{ localize "GIVE_XP.DistributeForm.Hostiles" }}
  22. </a>
  23. </nav>
  24. <section id="actor-select-tabs">
  25. <div data-tab="friendlies">
  26. <p class="notes">{{ localize "GIVE_XP.DistributeForm.SelectFriendlies" }}</p>
  27. <div id="friendly-actor-list" class="give-xp--actor-list">
  28. {{#each friendlies}}
  29. {{> tokenListItem isChecked=(lookup ../defaultSelectedFriendlies @index)}}
  30. {{/each}}
  31. </div>
  32. </div>
  33. <div data-tab="hostiles" style="display: none;">
  34. <p class="notes">{{ localize "GIVE_XP.DistributeForm.SelectHostiles" }}</p>
  35. <div id="hostile-actor-list" class="give-xp--actor-list">
  36. {{#each hostiles}}
  37. {{> tokenListItem isChecked=true}}
  38. {{/each}}
  39. </div>
  40. </div>
  41. </section>
  42. <p id="hovered-creature" style="text-align: center;">&nbsp;</p>
  43. <h2>{{ localize "GIVE_XP.DistributeForm.Distribution" }}</h2>
  44. <div class="form-group">
  45. <label>{{ localize "GIVE_XP.DistributeForm.TotalXp" }}</label>
  46. <span id="total-xp">-</span>
  47. </div>
  48. <div class="form-group">
  49. <label>{{ localize "GIVE_XP.DistributeForm.CreaturesReceiving" }}</label>
  50. <span id="friend-receive-count">-</span>
  51. </div>
  52. <div class="form-group">
  53. <label>{{ localize "GIVE_XP.DistributeForm.XpPerCreature" }}</label>
  54. <span id="divisor-xp">-</span>
  55. </div>
  56. </form>
  57. <style>
  58. .give-xp--actor-list {
  59. display: flex;
  60. height: 276px;
  61. flex-wrap: wrap;
  62. overflow-y: scroll;
  63. margin-top: 6px;
  64. align-content: flex-start;
  65. }
  66. .give-xp--actor-list label {
  67. position: relative;
  68. cursor: pointer;
  69. }
  70. .give-xp--actor-list .give-xp--actor-icon {
  71. display: block;
  72. width: 82px;
  73. height: 82px;
  74. margin: 5px;
  75. border: 2px solid transparent;
  76. border-radius: 2px;
  77. background-size: contain;
  78. background-repeat: no-repeat;
  79. }
  80. .give-xp--actor-list :checked + .give-xp--actor-icon {
  81. background-color: #3CF23C55;
  82. box-shadow: 0 0 2px 2px #3CF23C;
  83. }
  84. .give-xp--actor-list input {
  85. display: none;
  86. }
  87. .give-xp--actor-list .give-xp--actor-xp {
  88. color: #FFFFFF;
  89. text-shadow: 0 0 3px black;
  90. display: block;
  91. position: absolute;
  92. bottom: 4px;
  93. left: 50%;
  94. max-width: 95%;
  95. transform: translateX(-50%);
  96. white-space: nowrap;
  97. }
  98. </style>