diff --git a/module/actor-sheet.js b/module/actor-sheet.js index e8a153a..af192a2 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -34,6 +34,12 @@ export class SimpleActorSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); + // Handle rollable attributes. + html.find('.items .rollable').click(ev => { + let r = new Roll($(ev.currentTarget).data('roll'), this.actor.getRollData()); + r.roll().toMessage(); + }); + // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; diff --git a/module/simple.js b/module/simple.js index a880059..d618abc 100644 --- a/module/simple.js +++ b/module/simple.js @@ -82,4 +82,11 @@ Hooks.once("init", async function() { } } + /** + * Slugify a string. + */ + Handlebars.registerHelper('slugify', function(value) { + return value.slugify({strict: true}); + }); + }); diff --git a/styles/simple.css b/styles/simple.css index f4090e1..5729e0c 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -94,6 +94,11 @@ .worldbuilding .item-list .item-controls { flex: 0 0 36px; } +.worldbuilding .item-list .item-button { + height: 100%; + line-height: 1; + font-size: 11px; +} .worldbuilding .attributes-header { padding: 5px; margin: 5px 0; diff --git a/styles/simple.less b/styles/simple.less index ba89e19..cf37f71 100644 --- a/styles/simple.less +++ b/styles/simple.less @@ -105,6 +105,12 @@ .item-controls { flex: 0 0 36px; } + + .item-button { + height: 100%; + line-height: 1; + font-size: 11px; + } } /* Attributes */ diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index c51e2a3..715d1e1 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -40,6 +40,11 @@