Skip to content

Commit

Permalink
1.3.27
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Jul 8, 2022
1 parent f3ca0b7 commit b459bd0
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.3.27

Added a setting for hiding chat portraits for secret GM rolls (default ON).
Fixed Narrator tools toggle in the controls.
Fixed a bug where Storyteller Stories could not be opened after being closed.
Fixed a bug where tooltips/context menus were showing behind Monk's hotbar.
Updates to PC sheet dark mode by @Vesselchuck.

# 1.3.26

Fixed styling of voluntary flaw boost buttons. Darkmode PC sheet and familiar sheet maintenance updates from @Vesselchuck.
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "Overhauls the Foundry UI and several modules.",
"url": "https://github.com/Dorako/pf2e-dorako-ui",
"author": "Dorako",
"version": "1.3.26",
"version": "1.3.27",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"system": ["pf2e"],
"scripts": ["scripts/dorako-ui.js"],
"templates": ["templates/*"],
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.3.26.zip",
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.3.27.zip",
"manifest": "https://github.com/Dorako/pf2e-dorako-ui/raw/main/module.json"
}
37 changes: 34 additions & 3 deletions scripts/dorako-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

// setTimeout(cleanHTML, 10000);

Hooks.on("ready", async function () {
jQuery.fx.off = true;
});
// Hooks.on("ready", async function () {
// jQuery.fx.off = true;
// });

const debouncedReload = foundry.utils.debounce(
() => window.location.reload(),
Expand Down Expand Up @@ -233,8 +233,27 @@ Hooks.once("init", async function () {
"insertSpeakerImage"
);

const hideGmIconWhenSecret = game.settings.get(
"pf2e-dorako-ui",
"hideGmIconWhenSecret"
);

if (chatPortraitSetting === "none") return false;

const whisperTargets = message.whisper;

const isBlind = message.blind || false;
const isWhisper = whisperTargets?.length > 0 || false;
const isSelf =
isWhisper &&
whisperTargets.length === 1 &&
whisperTargets[0] === message.user;

const user = game.users.get(message.user);
if (hideGmIconWhenSecret && user.isGM && (isBlind || isSelf)) {
return false;
}

let combatantImg;
let actorImg;
let tokenImg;
Expand Down Expand Up @@ -402,6 +421,18 @@ Hooks.once("init", async function () {
},
});

game.settings.register("pf2e-dorako-ui", "hideGmIconWhenSecret", {
name: "Hide chat portrait when secret?",
hint: "Hide the chat portrait whenever GM rolls secret/private rolls.",
scope: "world",
config: true,
default: true,
type: Boolean,
onChange: () => {
debouncedReload();
},
});

game.settings.register("pf2e-dorako-ui", "chat-portrait-size", {
name: "Chat portrait size",
hint: "Suggested size of 36px.",
Expand Down
7 changes: 7 additions & 0 deletions styles/app-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,11 @@
margin: 1px;
transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
box-shadow: var(--gold-and-glow);
}

/* Storyteller module */
.window-app.story-sheet .window-content,
.window-app.story-sheet .window-header {
box-shadow: none;
background-color: transparent;
}
6 changes: 5 additions & 1 deletion styles/controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
background-image: none;
}

#controls ol li.control-tool.toggle,
#controls .app li,
#controls ol li,
#controls ol.sub-controls .control-tool,
Expand Down Expand Up @@ -110,18 +111,21 @@
/* backdrop-filter: var(--dorako-vibrancy-active); */
}

#controls ol li.control-tool.toggle,
#controls ol.sub-controls .control-tool.toggle {
background-color: var(--paizo-blue-dark);
/* backdrop-filter: var(--dorako-vibrancy); */
}

#controls ol li.control-tool.toggle:hover,
#controls ol li.control-tool.toggle.active:hover,
#controls ol.sub-controls .control-tool.toggle:hover,
#controls ol.sub-controls .control-tool.toggle.active:hover {
background-color: var(--paizo-blue);
/* backdrop-filter: var(--dorako-vibrancy-active) var(--dorako-vibrancy-active); */
}

#controls ol.control-tools>li.toggle:hover,
#controls ol li.control-tool.toggle.active,
#controls ol.sub-controls .control-tool.toggle.active {
background-color: var(--paizo-blue-bright);
/* backdrop-filter: brightness(1.5), var(--dorako-vibrancy-active); */
Expand Down
1 change: 1 addition & 0 deletions styles/hotbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
/* left: -32px; */
transition: unset;
gap: 2px;
z-index: -1;
max-height: 270px;
overflow: visible;
}
Expand Down

0 comments on commit b459bd0

Please sign in to comment.