Fix text overflow in light/dark time studies

This commit is contained in:
SpectralFlame 2023-05-02 22:57:38 -05:00 committed by cyip92
parent 8ce6c23ffd
commit 13ceca948a
3 changed files with 23 additions and 10 deletions

View File

@ -123,7 +123,7 @@
.o-time-study--small {
width: 12rem;
font-size: 0.9rem;
font-size: 0.85rem;
padding-right: 0.5rem;
padding-left: 0.5rem;
}

View File

@ -108,7 +108,24 @@ export default {
},
config() {
return { ...this.study.config, formatCost: value => (value >= 1e6 ? format(value) : formatInt(value)) };
}
},
showDefaultCostDisplay() {
const costCond = (this.showCost && !this.showStCost) || this.STCost === 0;
return !this.setup.isSmall && !this.doomedRealityStudy && costCond;
},
customCostStr() {
const ttStr = this.setup.isSmall
? `${formatInt(this.config.cost)} TT`
: quantifyInt("Time Theorem", this.config.cost);
const stStr = this.setup.isSmall
? `${formatInt(this.STCost)} ST`
: quantifyInt("Space Theorem", this.STCost);
const costs = [];
if (this.config.cost) costs.push(ttStr);
if (this.STCost && this.showStCost) costs.push(stStr);
return costs.join(" + ");
},
},
methods: {
update() {
@ -164,17 +181,13 @@ export class TimeStudySetup {
>
<slot />
<CostDisplay
v-if="!doomedRealityStudy && ((showCost && !showStCost) || STCost === 0)"
v-if="showDefaultCostDisplay"
br
:config="config"
name="Time Theorem"
/>
<div v-else-if="showStCost">
Cost:
<span v-if="config.cost">
{{ quantifyInt("Time Theorem", config.cost) }} and
</span>
{{ quantifyInt("Space Theorem", STCost) }}
<div v-else-if="!isBought">
Cost: {{ customCostStr }}
</div>
</button>
</template>

View File

@ -78,7 +78,7 @@ GameDatabase.changelog = [
<li>Improved UI behavior when importing saves in certain conditions</li>
<li>Teresa's EU-start upgrade now applies retroactively</li>
<li>Offline ticks are now limited to a minimum of 33ms instead of 50ms</li>
<li>"Offline" progress due to device hibernation or game unfocusing now gets simulated as if it were offline time
<li>"Offline" progress due to device hibernation now gets simulated as if it were offline time
instead of being applied as a single large tick</li>
<li>Offline/hibernation maximum time has been increased from 6 hours to 24 hours</li>
<li>Text references to Teresa's Perk Shop have been more standardized</li>