Skip to content

Commit

Permalink
fix: danger pts design (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Armaklan authored and mattraykowski committed Jun 9, 2023
1 parent 97a00cd commit 840279c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
12 changes: 10 additions & 2 deletions css/svnsea2e.css
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ input[type=range]::-webkit-slider-thumb {
}
.actor .danger-points input[type=text] {
font-size: 6em;
height: 1.5em;
width: 1.5em;
height: 1.3em;
width: 1.3em;
border: 4px solid #530202;
border-radius: 2em;
text-align: center;
Expand All @@ -901,6 +901,14 @@ input[type=range]::-webkit-slider-thumb {
margin-top: 3em;
width: auto;
}
.actor .sheet-header.dangerpts {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
margin: 0px;
gap: 8px;
}
.actor .sheet-header.dangerpts .profile-img {
-webkit-box-flex: 0;
-ms-flex: 0 0 50px;
Expand Down
10 changes: 7 additions & 3 deletions module/actor/sheets/dangerpts.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ export class ActorSheetSS2eDangerPts extends ActorSheetSS2e {

_decreaseDP(value, event) {
let dp = 0;
if (this.actor.data.data.points > value) {
if (this.actor.system.points > value) {
dp = parseInt(this.actor.data.data.points) - parseInt(value);
}

this.actor
.update({
points: dp,
system: {
points: dp,
},
})
.then(this.render(false));
}
Expand All @@ -53,7 +55,9 @@ export class ActorSheetSS2eDangerPts extends ActorSheetSS2e {

this.actor
.update({
points: dp,
system: {
points: dp,
},
})
.then(this.render(false));
}
Expand Down
22 changes: 14 additions & 8 deletions scss/components/_actors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ header.sheet-header {
.danger-points {
input[type='text'] {
font-size: $f-s-4xl;
height: 1.5em;
width: 1.5em;
height: 1.3em;
width: 1.3em;
border: $brd-s-lg-dk;
border-radius: 2em;
text-align: center;
Expand All @@ -81,12 +81,18 @@ header.sheet-header {
}
}

.sheet-header.dangerpts .profile-img {
flex: 0 0 $profile-img-sm-size;
height: $profile-img-sm-size;
width: $profile-img-sm-size;
border: $brd-s-sm-dk;
border-radius: $profile-img-sm-size;
.sheet-header.dangerpts {
flex-direction: row;
margin: 0px;
gap: $margin-md;

.profile-img {
flex: 0 0 $profile-img-sm-size;
height: $profile-img-sm-size;
width: $profile-img-sm-size;
border: $brd-s-sm-dk;
border-radius: $profile-img-sm-size;
}
}

.red {
Expand Down

0 comments on commit 840279c

Please sign in to comment.