Skip to content

Commit

Permalink
1.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Sep 13, 2022
1 parent ecb3d38 commit 05ffc1d
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 216 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.6.3

Fixed an issue causing DF Chat Enhancement context menus to sometimes be inaccesible.

Rejiggered some css - possibly increased performance for low end machines.

# 1.6.2

Updated manifest _again_.
Expand Down
5 changes: 2 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
],
"version": "1.6.2",
"compatibility": {
"minimum": "10.0.0",
"verified": "10.285",
"maximum": "10"
"minimum": "10",
"verified": "10.284"
},
"relationship": {
"systems": [
Expand Down
155 changes: 70 additions & 85 deletions scripts/dorako-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,18 +785,6 @@ Hooks.once("init", async () => {
},
});

game.settings.register("pf2e-dorako-ui", "disable-all-styles", {
name: "Disable all styles?",
hint: "Ignore all the toggles and removes any effect of the module, without having to disable it.",
scope: "client",
type: Boolean,
default: false,
config: true,
onChange: () => {
debouncedReload();
},
});

game.settings.register("pf2e-dorako-ui", "center-hotbar", {
name: "Center hotbar (macrobar)?",
hint: "",
Expand Down Expand Up @@ -994,85 +982,82 @@ Hooks.once("init", async () => {
},
});

if (!game.settings.get("pf2e-dorako-ui", "disable-all-styles")) {
injectCSS("dorako-ui");

const root = document.querySelector(":root").style;
if (game.settings.get("pf2e-dorako-ui", "center-hotbar")) {
root.setProperty("--hotbar-margin-left", "calc(50% - 300px)");
} else {
root.setProperty("--hotbar-margin-left", "10px");
}
injectCSS("dorako-ui");

if (game.settings.get("pf2e-dorako-ui", "backdrop-filter")) {
root.setProperty(
"--dorako-vibrancy",
"brightness(1.5) contrast(1.2) saturate(1.5) blur(5px)"
);
root.setProperty("--dorako-bg-current", "var(--dorako-bg-glass)");
}
const root = document.querySelector(":root").style;
if (game.settings.get("pf2e-dorako-ui", "center-hotbar")) {
root.setProperty("--hotbar-margin-left", "calc(50% - 300px)");
} else {
root.setProperty("--hotbar-margin-left", "10px");
}

if (game.settings.get("pf2e-dorako-ui", "backdrop-filter")) {
injectCSS("backdrop-filter");
root.setProperty(
"--edge-margin",
game.settings.get("pf2e-dorako-ui", "edge-offset").toString() + "px"
"--dorako-vibrancy",
"brightness(1.5) contrast(1.2) saturate(1.5) blur(5px)"
);
root.setProperty("--dorako-bg-current", "var(--dorako-bg-glass)");
}

root.setProperty(
"--chat-portrait-size",
game.settings.get("pf2e-dorako-ui", "chat-portrait-size").toString() +
"px"
);
root.setProperty(
"--edge-margin",
game.settings.get("pf2e-dorako-ui", "edge-offset").toString() + "px"
);

root.setProperty(
"--chat-input-height",
game.settings.get("pf2e-dorako-ui", "chat-input-height").toString() + "px"
);
root.setProperty(
"--chat-portrait-size",
game.settings.get("pf2e-dorako-ui", "chat-portrait-size").toString() + "px"
);

if (game.settings.get("pf2e-dorako-ui", "skin-navigation"))
injectCSS("navigation");
if (game.settings.get("pf2e-dorako-ui", "skin-controls"))
injectCSS("controls");
if (game.settings.get("pf2e-dorako-ui", "skin-token-hud"))
injectCSS("token-hud");
if (game.settings.get("pf2e-dorako-ui", "skin-chat")) injectCSS("chat");
if (game.settings.get("pf2e-dorako-ui", "skin-sidebar"))
injectCSS("sidebar");
if (game.settings.get("pf2e-dorako-ui", "skin-combat-tracker"))
injectCSS("combat-tracker");
if (game.settings.get("pf2e-dorako-ui", "skin-effect-panel"))
injectCSS("effect-panel");
if (game.settings.get("pf2e-dorako-ui", "skin-app-ui")) injectCSS("app-ui");
if (game.settings.get("pf2e-dorako-ui", "skin-hotbar")) injectCSS("hotbar");
if (game.settings.get("pf2e-dorako-ui", "skin-window-controls"))
injectCSS("window-control");
if (game.settings.get("pf2e-dorako-ui", "skin-token-action-hud"))
injectCSS("token-action-hud");
if (game.settings.get("pf2e-dorako-ui", "skin-custom-hotbar"))
injectCSS("custom-hotbar");
if (game.settings.get("pf2e-dorako-ui", "skin-dice-tray"))
injectCSS("dice-tray");
let headerStyle = game.settings.get("pf2e-dorako-ui", "headerStyle");
if (headerStyle != "none") {
injectCSS("header");
}
injectCSS("chat-dark");

if (game.settings.get("pf2e-dorako-ui", "skin-combat-carousel"))
injectCSS("combat-carousel");

setting = game.settings.get("pf2e-dorako-ui", "rolltype-indication");
if (setting == "both" || setting == "bg-color")
injectCSS("chat-blind-whisper");
if (game.settings.get("pf2e-dorako-ui", "chat-portrait-border"))
injectCSS("chat-portrait-border");
if (game.settings.get("pf2e-dorako-ui", "compact-ui"))
injectCSS("compact-ui");
if (game.settings.get("pf2e-dorako-ui", "no-logo")) injectCSS("no-logo");
setting = game.settings.get("pf2e-dorako-ui", "sheet");
if (setting == "dark") injectCSS("pc-sheet-dark");
setting = game.settings.get("pf2e-dorako-ui", "familiar-sheet");
if (setting == "dark" || setting == "darkRedHeader")
injectCSS("familiar-sheet-dark");
if (setting == "darkRedHeader") injectCSS("familiar-sheet-dark-red-header");
root.setProperty(
"--chat-input-height",
game.settings.get("pf2e-dorako-ui", "chat-input-height").toString() + "px"
);

if (game.settings.get("pf2e-dorako-ui", "skin-navigation"))
injectCSS("navigation");
if (game.settings.get("pf2e-dorako-ui", "skin-controls"))
injectCSS("controls");
if (game.settings.get("pf2e-dorako-ui", "skin-token-hud"))
injectCSS("token-hud");
if (game.settings.get("pf2e-dorako-ui", "skin-chat")) injectCSS("chat");
if (game.settings.get("pf2e-dorako-ui", "skin-sidebar")) injectCSS("sidebar");
if (game.settings.get("pf2e-dorako-ui", "skin-combat-tracker"))
injectCSS("combat-tracker");
if (game.settings.get("pf2e-dorako-ui", "skin-effect-panel"))
injectCSS("effect-panel");
if (game.settings.get("pf2e-dorako-ui", "skin-app-ui")) injectCSS("app-ui");
if (game.settings.get("pf2e-dorako-ui", "skin-hotbar")) injectCSS("hotbar");
if (game.settings.get("pf2e-dorako-ui", "skin-window-controls"))
injectCSS("window-control");
if (game.settings.get("pf2e-dorako-ui", "skin-token-action-hud"))
injectCSS("token-action-hud");
if (game.settings.get("pf2e-dorako-ui", "skin-custom-hotbar"))
injectCSS("custom-hotbar");
if (game.settings.get("pf2e-dorako-ui", "skin-dice-tray"))
injectCSS("dice-tray");
let headerStyle = game.settings.get("pf2e-dorako-ui", "headerStyle");
if (headerStyle != "none") {
injectCSS("header");
}
injectCSS("chat-dark");

if (game.settings.get("pf2e-dorako-ui", "skin-combat-carousel"))
injectCSS("combat-carousel");

setting = game.settings.get("pf2e-dorako-ui", "rolltype-indication");
if (setting == "both" || setting == "bg-color")
injectCSS("chat-blind-whisper");
if (game.settings.get("pf2e-dorako-ui", "chat-portrait-border"))
injectCSS("chat-portrait-border");
if (game.settings.get("pf2e-dorako-ui", "compact-ui"))
injectCSS("compact-ui");
if (game.settings.get("pf2e-dorako-ui", "no-logo")) injectCSS("no-logo");
setting = game.settings.get("pf2e-dorako-ui", "sheet");
if (setting == "dark") injectCSS("pc-sheet-dark");
setting = game.settings.get("pf2e-dorako-ui", "familiar-sheet");
if (setting == "dark" || setting == "darkRedHeader")
injectCSS("familiar-sheet-dark");
if (setting == "darkRedHeader") injectCSS("familiar-sheet-dark-red-header");
});
9 changes: 0 additions & 9 deletions styles/app-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
border: none;
border-radius: 0px;
box-shadow: none;
backdrop-filter: none;
background: none;
background-image: none;
}
Expand All @@ -18,18 +17,12 @@

#players {
background-color: var(--dorako-bg-current);
backdrop-filter: var(--dorako-vibrancy);
}

#players,
.window-app:not(.outlaws-wrapper, .journal-entry) .window-header,
.window-app.minimized .window-header {
border: none;
/* background-color: var(--dorako-bg-current);
backdrop-filter: var(--dorako-vibrancy); */
/*will-change: backdrop-filter;*/
/* transform: translate3d(0px, 0px, 0px); */
/* box-shadow: var(--glassy); */
}

#ui-top.offset {
Expand Down Expand Up @@ -189,7 +182,6 @@
font-weight: 900;
position: absolute;
right: 0px;
backdrop-filter: var(--dorako-vibrancy);
width: 55px;
justify-content: center;
}
Expand All @@ -214,7 +206,6 @@

.app.sidebar-popout .window-content {
background-color: var(--dorako-bg-current);
backdrop-filter: var(--dorako-vibrancy);
overflow: hidden;
}

Expand Down
33 changes: 33 additions & 0 deletions styles/backdrop-filter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.app.window-app,
#token-hud .attribute.bar1 input:hover,
.placeable-hud input[type="text"]:hover,
.placeable-hud .control-icon,
.placeable-hud input[type="text"],
#players,
.app.sidebar-popout .window-content,
#fps,
#custom-bar-toggle,
#custom-hotbar-page-controls,
#custom-hotbar-page-controls.bar-controls.flexcol,
#custom-hotbar #custom-macro-list.flexrow,
#dfcp-rt-buttons button,
.dice-tray button,
#token-hud .status-effects,
.status-effects .status-effect-summary,
#hotbar #hotbar-directory-controls,
#hotbar #hotbar-page-controls,
#hotbar #macro-list,
#hotbar .macro.inactive,
#hotbar .macro:not(.active),
#hotbar #macro-list,
#navigation #nav-toggle,
#navigation #scene-list .scene.view,
#navigation #nav-toggle:hover,
#navigation #scene-list .scene,
#navigation #scene-list .scene.gm,
#sidebar.app,
.tah-action button,
.tah-title-button,
.sheet.journal-entry {
backdrop-filter: var(--dorako-vibrancy);
}
6 changes: 3 additions & 3 deletions styles/chat-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}


#chat-log .dark-theme select,
#chat-log .dark-theme button,
#chat-log .dark-theme form button,
.dark-theme select,
.dark-theme .pf2e.chat-card .card-buttons button,
.dark-theme form button,
.dark-theme .dice-roll .dice-formula,
.dark-theme .dice-total:not(.statuseffect-message),
.dark-theme .message-content .chat-damage-buttons button {
Expand Down
10 changes: 10 additions & 0 deletions styles/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -1654,4 +1654,14 @@ span[data-pf2-check].with-repost {
.dark-theme .monks-tokenbar .sheet .items-list,
.dark-theme .monks-tokenbar.chat-card .card-header h3 {
color: white;
}

/* .message #context-menu.expand-down {
top: unset;
} */

.dfce-cm-bottom #context-menu,
.dfce-cm-middle #context-menu,
.dfce-cm-top #context-menu {
display: contents;
}
2 changes: 1 addition & 1 deletion styles/controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

#controls ol .scene-control,
#controls ol .control-tool {
transition: backdrop-filter 0.15s ease-out;
/* transition: backdrop-filter 0.15s ease-out; */
transition: background-color 0.15s ease-out;
color: rgba(240, 240, 240, 1);
text-shadow: var(--dorako-text-shadow);
Expand Down
7 changes: 3 additions & 4 deletions styles/dice-tray.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
/* Glass - Add new styling */

#dfcp-rt-buttons button,
.dice-tray button
{
.dice-tray button {
border: none;
border-radius: var(--dorako-radius);
background-color: var(--dorako-bg-current);
backdrop-filter: var(--dorako-vibrancy);
/* backdrop-filter: var(--dorako-vibrancy); */
/*will-change: backdrop-filter;*/
transform: translate3d(0px, 0px, 0px);
box-shadow: var(--glassy);
Expand All @@ -34,5 +33,5 @@
}

.dice-tray button svg {
height:32px;
height: 32px;
}
9 changes: 6 additions & 3 deletions styles/dorako-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@
--dorako-vibrancy-inactive: brightness(0.5) contrast(1.0) blur(15px); */

--gold-and-glow: 0 0 0 1px var(--tertiary), 0 0 0 2px #9f725b, inset 0 0 3px rgba(255, 255, 255, .5);
--glassy:
/* --glassy:
0px 0px 2px rgba(255, 255, 255, 0.4) inset,
0px 0px 6px rgba(255, 255, 255, 0.2) inset,
1px 1px 1px rgba(0, 0, 0, 1),
1px -1px 1px rgba(0, 0, 0, 1),
-1px -1px 1px rgba(0, 0, 0, 1),
-1px 1px 1px rgba(0, 0, 0, 1),
0px 0px 3px rgba(0, 0, 0, 1),
0px 0px 4px rgba(0, 0, 0, 0.5);

0px 0px 4px rgba(0, 0, 0, 0.5); */
--glassy:
0px 0px 3px 0px rgba(255, 255, 255, 0.4) inset,
0px 0px 2px 1px rgba(0, 0, 0, 1),
0px 0px 5px 0px rgba(0, 0, 0, 0.5);

--primary-hue: 0;
--primary-sat: 100%;
Expand Down
Loading

0 comments on commit 05ffc1d

Please sign in to comment.