mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-25 05:32:17 +00:00
Add tab switching for clicking bought dilation studies
This commit is contained in:
parent
1f7875d1b2
commit
f247a995dc
@ -58,6 +58,21 @@ export default {
|
|||||||
}
|
}
|
||||||
this.currTT.copyFrom(Currency.timeTheorems.value);
|
this.currTT.copyFrom(Currency.timeTheorems.value);
|
||||||
this.ttGen.copyFrom(getTTPerSecond().times(getGameSpeedupFactor()));
|
this.ttGen.copyFrom(getTTPerSecond().times(getGameSpeedupFactor()));
|
||||||
|
},
|
||||||
|
clickHandler() {
|
||||||
|
switch (this.id) {
|
||||||
|
case 1:
|
||||||
|
return () => Tab.eternity.dilation.show();
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
return () => Tab.dimensions.time.show();
|
||||||
|
case 6:
|
||||||
|
return () => Tab.reality.glyphs.show();
|
||||||
|
default:
|
||||||
|
throw new Error("Unrecognized Dilation study was clicked");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -67,6 +82,7 @@ export default {
|
|||||||
<TimeStudyButton
|
<TimeStudyButton
|
||||||
:setup="setup"
|
:setup="setup"
|
||||||
:ach-tooltip="theoremTimeEstimate"
|
:ach-tooltip="theoremTimeEstimate"
|
||||||
|
:special-click="clickHandler()"
|
||||||
>
|
>
|
||||||
<DescriptionDisplay :config="study.config" />
|
<DescriptionDisplay :config="study.config" />
|
||||||
<template v-if="showRequirement">
|
<template v-if="showRequirement">
|
||||||
|
@ -20,6 +20,11 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
specialClick: {
|
||||||
|
type: Function,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -120,7 +125,8 @@ export default {
|
|||||||
this.STCost = this.study.STCost;
|
this.STCost = this.study.STCost;
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
this.study.purchase();
|
if (this.specialClick === null || !this.study.isBought) this.study.purchase();
|
||||||
|
else this.specialClick();
|
||||||
},
|
},
|
||||||
shiftClick() {
|
shiftClick() {
|
||||||
if (this.study.purchaseUntil) this.study.purchaseUntil();
|
if (this.study.purchaseUntil) this.study.purchaseUntil();
|
||||||
|
Loading…
Reference in New Issue
Block a user