Skip to content

Commit

Permalink
Centered hotbar, v-padding decrease in cards, navbar color swap + twe…
Browse files Browse the repository at this point in the history
…aks, SmallTime patch
  • Loading branch information
Dorako committed Feb 5, 2022
1 parent 2bfb2e8 commit 7d75c39
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.0.5
Centered hotbar, v-padding decrease in cards, navbar color swap + tweaks, SmallTime patch
Centered hotbar setting, edge-margin setting, v-padding decrease in cards, navbar color swap + tweaks, SmallTime patch, Chat Portrait support, fix for 'flavor-text'
# 1.0.4
Added support for Combat Enhancements module
# 1.0.3
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pf2e-dorako-ui",
"title": "PF2e - Dorako UI",
"title": "PF2e Dorako UI",
"description": "Overhauls the Foundry UI and several modules.",
"url": "https://github.com/Dorako/pf2e-dorako-ui",
"author": "Dorako",
Expand Down
41 changes: 41 additions & 0 deletions scripts/dorako-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ Hooks.on('init', () => {
// }
// });



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.",
Expand All @@ -124,6 +126,36 @@ Hooks.on('init', () => {
}
});

game.settings.register('pf2e-dorako-ui', 'center-hotbar', {
name: "Center hotbar (macrobar)?",
hint: "",
scope: "client",
type: Boolean,
default: false,
config: true,
onChange: () => {
location.reload();
}
});

game.settings.register("pf2e-dorako-ui", "edge-offset", {
name: "Offset from the edge of screen in pixels",
hint: "",
scope: "client",
type: Number,
default: 10,
range: {
min: 5,
max: 30,
step: 1
},
config: true,
onChange: () => {
location.reload();
}
});


game.settings.register('pf2e-dorako-ui', 'skin-chat', {
name: "Apply skin to chat?",
hint: "Applies theming to chat cards and sidebar content.",
Expand Down Expand Up @@ -298,6 +330,15 @@ Hooks.on('init', () => {
if (!game.settings.get('pf2e-dorako-ui', 'disable-all-styles')) {
injectBaseCss()

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');
}

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

if (game.settings.get('pf2e-dorako-ui', 'skin-navigation')) {
skinNavigation()
}
Expand Down
3 changes: 2 additions & 1 deletion styles/app-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
margin: 0 var(--edge-margin) 0 var(--edge-margin);
}

/* Hotbar */
#ui-bottom {
/* margin-left: 9px; */
margin-left: calc(50% - 300px);
margin-left: var(--hotbar-margin-left);
}


Expand Down
68 changes: 64 additions & 4 deletions styles/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@




#chat-form,
#chat-controls,
.dice-tray>*,
Expand Down Expand Up @@ -112,7 +113,7 @@
"text text text text"minmax(min-content, max-content)
/42px 1.5fr 0fr 2.8fr;
background-color:var(--paizo-red);
border-bottom: 1px solid black;
/* border-bottom: 1px solid black; */
border-radius: 5px 5px 0px 0px;
margin-top: -5px;
padding-top: 5px;
Expand All @@ -122,6 +123,60 @@
padding-left: 5px;
}

.flavor-text {
background-size: cover;
background-image: var(--img-parchment);
background-blend-mode: luminosity;
/* background:#E5E1DA; */
padding-left:5px;
margin-left:-5px;
padding-right:5px;
margin-right:-5px;
}

.whisper .flavor-text {
background-color: #EDEDFF;
background-color: var(--whisper-bg);

}

.blind .flavor-text {
/* background: #FDE4FF; */
background-color: var(--blind-bg);
}


.whisper-to {
background-size: cover;
background-image: var(--img-parchment);
background-blend-mode: luminosity;
background-color: var(--whisper-bg);
margin-right: -5px;
padding-right: 5px;
margin-left: -5px;
padding-left: 5px;
}

.whisper-to * {
background-color: var(--whisper-bg);
}

.message-content .dice-roll .dice-result .dice-total.statuseffect-message {
border: 0px;
margin-top: 5px;
box-shadow: none;
background: none;
}

.message-content .dice-roll .statuseffect-message ul {
padding: 0px;
}

#chat-log hr {
margin-top: 1px;
margin-bottom: 1px;
}

.message-content h3.chat-portrait-text-size-name {
display: flex;
align-items: center;
Expand All @@ -146,10 +201,11 @@
border-width: 0px;
}

.whisper-to * {
background-color: var(--whisper-bg);
.message-delete {
margin-left: 5px
}


.chat-mode-indicator {
background-color: rgba(140, 40, 40, 1);
}
Expand Down Expand Up @@ -179,6 +235,8 @@
border-image-width: 14px;
border-style: double;
padding: 5px;
padding-left: 8px;
padding-right: 8px;
}

.pf2e.chat-card .card-content p {
Expand Down Expand Up @@ -289,6 +347,8 @@





#chat-log .message {
margin: 0px;
}
Expand Down Expand Up @@ -387,7 +447,7 @@ button {
#chat-log .message .message-header .flavor-text,
#chat-log .message .message-header .whisper-to {
grid-area: text;
padding: var(--body-padding);
/* padding: var(--body-padding); */
}

.message.dfce-cm-top {
Expand Down
15 changes: 0 additions & 15 deletions styles/hotbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,3 @@
border-radius: 2px;
overflow: hidden;
}


#smalltime-app::after {
transition: box-shadow 0.5s ease-in-out;
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: var(--glassy);
border-radius: 2px;
overflow: hidden;
z-index:1000;
}

0 comments on commit 7d75c39

Please sign in to comment.