Skip to content

Commit

Permalink
2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Aug 28, 2023
1 parent 19fba62 commit f28de29
Show file tree
Hide file tree
Showing 45 changed files with 455 additions and 4,695 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2.6.0

- (Refinement) Updated styling of Idle's Token Tooltip courtesy of Symon.
- (Refinement) Converted certain styling to variables to allow for easier changes.
- (New) Added a new UX setting for changing the roundedness of UI elements.
- (New) Added a new UX setting for changing the alignment of controls.
- (New) Added a new UX setting for changing the size of control and navigation elements.
- (Fix) Fixed an issue where Dorako UI and Forien's Easy Polls would result in an infinite loop when opening the dialog.

# 2.5.0.1

- (Bugfix) Removed Roll of Fate code that didn't work
Expand All @@ -7,7 +16,7 @@
- (New) Added a new experimental UX setting "Enable chat merge?" based on DFCE's chat merge functionality.
- (New) Added a new experimental UX setting "Adjust chat controls?" based on DFCE's privacy buttons functionality.
- (New) Added ability to set keybinds for specific rolltypes, or toggling between public and secret, when new chat controls feature is enabled.
- (Maintence) Fixed an issue that caused certain buttons in the Effects Panel overlay to break.
- (Maintenance) Fixed an issue that caused certain buttons in the Effects Panel overlay to break.
- (Maintenance) Potentially fixed an issue where inline links in the new AP were unreadable.

# 2.4.0
Expand Down
17 changes: 17 additions & 0 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@
"name": "Restructure chat card info?",
"hint": "Makes action-cost for features more apparent, and moves spell info out of the footer"
},
"border-radius": {
"name": "Roundedness",
"hint": "(default: 3px) Changes the degree of roundedness in many UI elements"
},
"control-size": {
"name": "Control size",
"hint": "(default: 36px) Changes the size of controls and navigation elements"
},
"controls-alignment": {
"name": "Controls alignment",
"hint": "Changes the position of the controls",
"choice": {
"start": "Top",
"center": "Middle",
"end": "Bottom"
}
},
"chat-merge": {
"name": "Enable chat merge?",
"hint": "(Experimental) Merges messages sent in a rapid sequence together to save space"
Expand Down
2 changes: 1 addition & 1 deletion modules/base-theme-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Hooks.on("renderDialog", (app, html, data) => {
position.height += 6;
position.width += 6;
app.setPosition(position);
app.render();
// app.render(); // Breaks forien-easy-poll
});

// Add .dorako-ui and .dialog to all "Dialogs"
Expand Down
5 changes: 4 additions & 1 deletion modules/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ Hooks.once("init", async () => {
const root = document.querySelector(":root").style;

root.setProperty("--avatar-size", game.settings.get("pf2e-dorako-ui", "avatar.size").toString() + "px");
root.setProperty("--border-radius", game.settings.get("pf2e-dorako-ui", "ux.border-radius").toString() + "px");
root.setProperty("--control-size", game.settings.get("pf2e-dorako-ui", "ux.control-size").toString() + "px");
root.setProperty("--controls-alignment", game.settings.get("pf2e-dorako-ui", "ux.controls-alignment").toString());

util.debug("injected sheets");
util.debug("initialized properties");
});

Hooks.once("ready", () => {
Expand Down
57 changes: 57 additions & 0 deletions modules/settings/ux-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export class UXSettings extends SettingsMenuDorakoUI {
"adjust-token-effects-hud",
"animate-messages",
"no-compendium-banner-images",
"border-radius",
"control-size",
"controls-alignment",
];

rerenderChatMessages() {}
Expand Down Expand Up @@ -62,6 +65,60 @@ export class UXSettings extends SettingsMenuDorakoUI {
}
},
},
"control-size": {
name: "pf2e-dorako-ui.settings.ux.control-size.name",
hint: "pf2e-dorako-ui.settings.ux.control-size.hint",
scope: "client",
type: Number,
default: 36,
range: {
min: 18,
max: 72,
step: 1,
},
config: true,
requiresReload: false,
onChange: (value) => {
const root = document.querySelector(":root").style;
root.setProperty("--control-size", `${value}px`);
},
},
"border-radius": {
name: "pf2e-dorako-ui.settings.ux.border-radius.name",
hint: "pf2e-dorako-ui.settings.ux.border-radius.hint",
scope: "client",
type: Number,
default: 3,
range: {
min: 0,
max: 48,
step: 1,
},
config: true,
requiresReload: false,
onChange: (value) => {
const root = document.querySelector(":root").style;
root.setProperty("--border-radius", `${value}px`);
},
},
"controls-alignment": {
name: "pf2e-dorako-ui.settings.ux.controls-alignment.name",
hint: "pf2e-dorako-ui.settings.ux.controls-alignment.hint",
scope: "client",
type: String,
default: "start",
choices: {
start: "pf2e-dorako-ui.settings.ux.controls-alignment.choice.start",
center: "pf2e-dorako-ui.settings.ux.controls-alignment.choice.center",
end: "pf2e-dorako-ui.settings.ux.controls-alignment.choice.end",
},
config: true,
requiresReload: false,
onChange: (value) => {
const root = document.querySelector(":root").style;
root.setProperty("--controls-alignment", value);
},
},
"adjust-token-effects-hud": {
name: "pf2e-dorako-ui.settings.ux.adjust-token-effects-hud.name",
hint: "pf2e-dorako-ui.settings.ux.adjust-token-effects-hud.hint",
Expand Down
6 changes: 6 additions & 0 deletions sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ $adjusted-lower: #cc3311 !default;
--header: url(../img/blue-header.webp);
--banner-top: url(../img/blue-sidebar-top.webp);
--banner-bottom: url(../img/blue-sidebar-bottom.webp);
// --avatar-size: controlled in code
// --border-radius: controlled in code
// --control-size: controlled in code;
--hotbar-width: unset;
// --controls-alignment: controlled in code
--controls-margin: 8px;
}

/* ----------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion sass/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin glass {
border: none;
border-radius: 3px;
border-radius: var(--border-radius);
background: none;
background-color: var(--glass-bg);
box-shadow: var(--glassy);
Expand Down
16 changes: 11 additions & 5 deletions sass/foundry/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,31 @@

nav#controls.dorako-ui {
padding-top: 12px;
padding-bottom: 12px;
display: flex;
align-items: var(--controls-alignment);

// Fix foundry's inconsistent gaps
ol.control-tools.sub-controls > li,
ol.control-tools.main-controls {
margin-right: 8px;
margin-right: var(--controls-margin);
}

ol.control-tools {
&.main-control {
margin-right: 8px;
margin-right: var(--controls-margin);
}

li.control-tool,
> li {
@include glass;
@include quick-transition;
text-shadow: 0px 0px 3px black;
border-radius: 3px;
margin-bottom: 8px;
border-radius: var(--border-radius);
margin-bottom: var(--controls-margin);
height: var(--control-size);
width: var(--control-size);
font-size: calc(var(--control-size) - 12px);

img {
filter: sepia() grayscale(0.9) brightness(0.8) drop-shadow(0px 0px 3px black);
Expand Down Expand Up @@ -57,7 +63,7 @@ nav#controls.dorako-ui {
#darkness-adjuster.dorako-ui {
@include glass;
height: 36px !important;
border-radius: 3px;
border-radius: var(--border-radius);
backdrop-filter: blur(5px);

.window-content {
Expand Down
8 changes: 5 additions & 3 deletions sass/foundry/_hotbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
width: 100%;
height: 100%;
box-shadow: var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand All @@ -34,7 +34,7 @@
width: 100%;
height: 100%;
box-shadow: 0px 0px 10px rgba(220, 200, 100, 0.5) inset, var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand All @@ -45,10 +45,11 @@
padding: 0px;
font-weight: initial;
text-shadow: 0px 1px 5px black, 0px 1px 5px black;
font-size: calc(var(--macro-size) / 3);
}

.macro-icon {
border-radius: 3px;
border-radius: var(--border-radius);
border: none;
height: calc(var(--macro-size) + 2px);
width: calc(var(--macro-size) + 2px);
Expand All @@ -74,6 +75,7 @@
margin: 0px 5px;
border: none;
grid-template-columns: repeat(10, calc(var(--macro-size) + 2px));
align-content: end;
}

.bar-controls {
Expand Down
8 changes: 6 additions & 2 deletions sass/foundry/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
#nav-toggle {
@include glass;
@include quick-transition;
flex: 0 0 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 var(--control-size);
height: var(--control-size);
}

ol#scene-list {
li.nav-item {
@include glass;
@include quick-transition;
text-shadow: 0px 0px 3px black;
line-height: var(--control-size);

> a:hover {
text-shadow: unset;
Expand Down
21 changes: 19 additions & 2 deletions sass/foundry/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,33 @@ section.chat-sidebar {
#sidebar.dorako-ui {
@include glass;
border: none;
border-radius: 6px 3px 3px 3px;
// border-radius: 6px 3px 3px 3px;
border-radius: 6px var(--border-radius) var(--border-radius) var(--border-radius);

&.collapsed {
border-radius: 3px;
border-radius: var(--border-radius);

#sidebar-tabs .item.active {
border: none;
margin: 2px 4px;
}
}
#settings ul#game-details li.system-buttons {
gap: 5px;
button {
border-radius: var(--border-radius) !important;
}
}

// button {
// @include glass;
// background-color: var(--glass-bg-light);
// color: var(--color-text-light-heading);
// &:hover {
// background-color: var(--primary-light);
// color: var(--color-text-light-highlight);
// }
// }

#sidebar-tabs {
--sidebar-tab-height: 20px;
Expand Down
13 changes: 7 additions & 6 deletions sass/foundry/_token-hud.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
margin: 0px;
padding: 0px;
background-color: var(--glass-bg);
border-radius: var(--border-radius);

&::before {
content: "";
Expand All @@ -22,7 +23,7 @@
width: 100%;
height: 100%;
box-shadow: var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand All @@ -35,7 +36,7 @@
width: 100%;
height: 100%;
box-shadow: var(--gold-and-glow), var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand All @@ -48,7 +49,7 @@
width: 100%;
height: 100%;
box-shadow: 0px 0px 10px rgba(220, 200, 100, 0.5) inset, var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand All @@ -61,7 +62,7 @@
width: 100%;
height: 100%;
box-shadow: var(--gold-and-glow), var(--glassy);
border-radius: 3px;
border-radius: var(--border-radius);
overflow: hidden;
pointer-events: none;
}
Expand Down Expand Up @@ -98,7 +99,7 @@
opacity: 1;
height: auto;
width: auto;
border-radius: 3px;
border-radius: var(--border-radius);
}
}

Expand Down Expand Up @@ -130,7 +131,7 @@
font-size: var(--font-size-16);
font-weight: 600;
line-height: var(--font-size-17);
border-radius: 0px 3px 0px 3px;
border-radius: 0px var(--border-radius) 0px var(--border-radius);
background: var(--primary-light);
// background: white;
margin: 1px;
Expand Down
2 changes: 1 addition & 1 deletion sass/module/_custom-hotbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* Custom Hotbar */
/* ----------------------------------------- */
:root {
--custom-hotbar-chb-macro-size: 52px;
--custom-hotbar-chb-macro-size: calc(var(--macro-size) + 2px);
}

// Custom hotbar introduces a 'hotbars' div, and restyles the core hotbar div
Expand Down
5 changes: 5 additions & 0 deletions sass/module/_forien-easy-polls.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.dorako-ui.dark-theme {
&.forien-easy-polls .forien-switch .forien-switch-actual-label {
color: var(--color-text-light-heading);
}
}
2 changes: 1 addition & 1 deletion sass/module/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"enhancen-terrain-layer", "filepicker-plus", "koboldworks-turn-announcer", "macros", "monarch", "monks", "polyglot",
"scene-preview", "speaking-as", "target-damage", "token-action-hud", "workbench", "party-overview", "pf2e-dailies",
"dalvyn-journal", "swade", "chat-reactions", "card-hand-mini-toolbar", "module-management-plus", "misc", "item-piles",
"pf2e-idle-hud", "pf2e-utility-buttons", "window-tabs";
"pf2e-idle-hud", "pf2e-utility-buttons", "window-tabs", "pinned-chatlog", "forien-easy-polls";
2 changes: 1 addition & 1 deletion sass/module/_monks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
}

#hotbar.dorako-ui {
width: 647px;
// width: 647px;

.hotbar-page {
overflow: visible;
Expand Down
Loading

0 comments on commit f28de29

Please sign in to comment.