Adjust weights Reset button in Glyphs tab

shouldn't be clickable when the Auto adjustment is on.
This commit is contained in:
Hirame1 2022-08-06 15:05:01 +07:00
parent 9059c5a388
commit 71bff51406
2 changed files with 11 additions and 1 deletions

View File

@ -8712,6 +8712,10 @@ kbd {
border-radius: var(--var-border-radius, 0.5rem);
padding: 0.2rem 0.5rem;
transition-duration: 0.2s;
user-select: none;
}
.c-glyph-levels-and-weights__reset-btn-clickable {
cursor: pointer;
}

View File

@ -171,6 +171,12 @@ export default {
"-ms-grid-row": r,
};
},
resetWeightsButtonClass() {
return {
"c-glyph-levels-and-weights__reset-btn": true,
"c-glyph-levels-and-weights__reset-btn-clickable": !this.isAutoAdjustWeightsOn
};
},
resetWeights() {
this.glyphWeightFields.forEach(e => player.celestials.effarig.glyphWeights[e] = 25);
this.resetSavedWeights();
@ -494,7 +500,7 @@ function roundPreservingSum(data) {
Adjust weights
<div class="l-glyph-levels-and-weights__reset-btn-outer">
<div
class="c-glyph-levels-and-weights__reset-btn"
:class="resetWeightsButtonClass()"
@click="resetWeights"
>
Reset