AD and Tickspeed buttons when Continuum is active

This commit is contained in:
Hirame1 2022-07-29 20:11:23 +07:00
parent 29c126100d
commit 0bc619070f
5 changed files with 42 additions and 9 deletions

View File

@ -1547,6 +1547,7 @@ br {
width: 17rem; width: 17rem;
font-size: 1.2rem; font-size: 1.2rem;
margin-right: 0.4rem; margin-right: 0.4rem;
transition: width 0s
} }
.o-primary-btn--buy-max { .o-primary-btn--buy-max {
@ -1584,6 +1585,7 @@ br {
width: 100%; width: 100%;
max-width: 20rem; max-width: 20rem;
margin: 0 0.5rem; margin: 0 0.5rem;
cursor: auto;
} }
.o-primary-btn--dimboost { .o-primary-btn--dimboost {

View File

@ -152,7 +152,7 @@ export default {
<div class="l-dim-row-multi-button-container"> <div class="l-dim-row-multi-button-container">
<PrimaryButton <PrimaryButton
v-if="!isContinuumActive" v-if="!isContinuumActive"
v-tooltip="boughtTooltip" :ach-tooltip="boughtTooltip"
:enabled="isAffordable && !isCapped && isUnlocked" :enabled="isAffordable && !isCapped && isUnlocked"
class="o-primary-btn--buy-ad o-primary-btn--buy-single-ad" class="o-primary-btn--buy-ad o-primary-btn--buy-single-ad"
:class="singlesClass()" :class="singlesClass()"

View File

@ -113,6 +113,14 @@ export default {
showCostTitle(value) { showCostTitle(value) {
return value.exponent < 1000000; return value.exponent < 1000000;
}, },
buttonClass() {
return {
"o-primary-btn": true,
"o-primary-btn--new": true,
"o-primary-btn--disabled": (!this.isAffordable && !this.isContinuumActive) || !this.isUnlocked || this.isCapped,
"o-non-clickable": this.isContinuumActive
};
},
tutorialClass() { tutorialClass() {
if (this.tier === 1) { if (this.tier === 1) {
return Tutorial.glowingClass(TUTORIAL_STATE.DIM1, this.isAffordable); return Tutorial.glowingClass(TUTORIAL_STATE.DIM1, this.isAffordable);
@ -143,8 +151,7 @@ export default {
/> />
<div class="l-dim-row-multi-button-container"> <div class="l-dim-row-multi-button-container">
<button <button
class="o-primary-btn o-primary-btn--new" :class="buttonClass()"
:class="{ 'o-primary-btn--disabled': (!isAffordable && !isContinuumActive) || !isUnlocked || isCapped}"
@click="buy" @click="buy"
> >
<div <div
@ -182,4 +189,8 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.o-non-clickable {
cursor: auto;
}
</style> </style>

View File

@ -73,6 +73,14 @@ export default {
this.galaxyCount = player.galaxies; this.galaxyCount = player.galaxies;
this.isContinuumActive = Laitela.continuumActive; this.isContinuumActive = Laitela.continuumActive;
if (this.isContinuumActive) this.continuumValue = Tickspeed.continuumValue; if (this.isContinuumActive) this.continuumValue = Tickspeed.continuumValue;
},
buttonClass() {
return {
"o-primary-btn": true,
"tickspeed-btn": true,
"o-primary-btn--disabled": !this.isAffordable && !this.isContinuumActive,
"o-non-clickable": this.isContinuumActive
};
} }
} }
}; };
@ -89,8 +97,7 @@ export default {
<div class="tickspeed-buttons"> <div class="tickspeed-buttons">
<button <button
v-tooltip="upgradeCount" v-tooltip="upgradeCount"
class="o-primary-btn tickspeed-btn" :class="buttonClass()"
:class="{ 'o-primary-btn--disabled': !isAffordable && !isContinuumActive }"
onclick="buyTickSpeed()" onclick="buyTickSpeed()"
> >
<span v-if="isContinuumActive"> <span v-if="isContinuumActive">
@ -120,4 +127,8 @@ export default {
.tickspeed-max-btn { .tickspeed-max-btn {
margin-left: 0.5rem; margin-left: 0.5rem;
} }
.o-non-clickable {
cursor: auto;
}
</style> </style>

View File

@ -75,6 +75,12 @@ export default {
this.galaxyCount = player.galaxies; this.galaxyCount = player.galaxies;
this.isContinuumActive = Laitela.continuumActive; this.isContinuumActive = Laitela.continuumActive;
if (this.isContinuumActive) this.continuumValue = Tickspeed.continuumValue; if (this.isContinuumActive) this.continuumValue = Tickspeed.continuumValue;
},
buttonClass() {
return {
"o-primary-btn--tickspeed": true,
"o-continuum": this.isContinuumActive
};
} }
}, },
}; };
@ -86,9 +92,8 @@ export default {
<div> <div>
<PrimaryButton <PrimaryButton
v-tooltip="upgradeCount" v-tooltip="upgradeCount"
:enabled="isAffordable" :enabled="isAffordable || isContinuumActive"
class="o-primary-btn--tickspeed" :class="buttonClass()"
:style="{ width: isContinuumActive ? '25rem' : ''}"
onclick="buyTickSpeed()" onclick="buyTickSpeed()"
> >
<span v-if="isContinuumActive">Continuum: {{ continuumString }}</span> <span v-if="isContinuumActive">Continuum: {{ continuumString }}</span>
@ -112,5 +117,9 @@ export default {
</template> </template>
<style scoped> <style scoped>
.o-continuum {
width: 25rem;
transition: width 0s;
cursor: auto;
}
</style> </style>