Skip to content

Commit

Permalink
Merge pull request #68 from MrVauxs/patch-1
Browse files Browse the repository at this point in the history
Add a setting for the min. scale of pop-out tokens
  • Loading branch information
Dorako authored Jul 18, 2022
2 parents db86231 + 54b78cf commit d96c96b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion scripts/dorako-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Hooks.once("init", async function () {
if (!border && popoutTokenPortraits) {
const tk = canvas.tokens?.get(message.speaker.token);
const scale = tk?.data.scale;
if (scale >= 1.5) {
if (scale >= game.settings.get("pf2e-dorako-ui", "popout-token-portraits-scale")) {
sizeClass = "scale-up ";
}
}
Expand Down Expand Up @@ -498,6 +498,23 @@ Hooks.once("init", async function () {
debouncedReload();
},
});

game.settings.register("pf2e-dorako-ui", "popout-token-portraits-scale", {
name: "Chat portrait token popout scale",
hint: "Set the minimum threshold for the token scale to be 'popped out' of the chat portraits.",
scope: "client",
type: Number,
default: 1.5,
range: {
min: 0.2,
max: 3,
step: 0.1,
},
config: true,
onChange: () => {
debouncedReload();
},
});

game.settings.register("pf2e-dorako-ui", "chat-portrait-border", {
name: "... and add a border?",
Expand Down

0 comments on commit d96c96b

Please sign in to comment.