Add tooltips to various things
This commit is contained in:
parent
9f79b186bd
commit
50fec80831
2 changed files with 34 additions and 3 deletions
|
@ -30,12 +30,20 @@ import { createResource, displayResource, trackBest } from "features/resources/r
|
||||||
import Resource from "features/resources/Resource.vue";
|
import Resource from "features/resources/Resource.vue";
|
||||||
import { createTab } from "features/tabs/tab";
|
import { createTab } from "features/tabs/tab";
|
||||||
import { createTabFamily } from "features/tabs/tabFamily";
|
import { createTabFamily } from "features/tabs/tabFamily";
|
||||||
import { createTree, createTreeNode, GenericTreeNode, TreeBranch } from "features/trees/tree";
|
import { addTooltip, TooltipDirection } from "features/tooltips/tooltip";
|
||||||
|
import {
|
||||||
|
createResourceTooltip,
|
||||||
|
createTree,
|
||||||
|
createTreeNode,
|
||||||
|
GenericTreeNode,
|
||||||
|
TreeBranch
|
||||||
|
} from "features/trees/tree";
|
||||||
import { createUpgrade } from "features/upgrades/upgrade";
|
import { createUpgrade } from "features/upgrades/upgrade";
|
||||||
import { createLayer } from "game/layers";
|
import { createLayer } from "game/layers";
|
||||||
import {
|
import {
|
||||||
createAdditiveModifier,
|
createAdditiveModifier,
|
||||||
createExponentialModifier,
|
createExponentialModifier,
|
||||||
|
createModifierSection,
|
||||||
createSequentialModifier
|
createSequentialModifier
|
||||||
} from "game/modifiers";
|
} from "game/modifiers";
|
||||||
import { persistent } from "game/persistence";
|
import { persistent } from "game/persistence";
|
||||||
|
@ -357,8 +365,8 @@ const layer = createLayer(id, () => {
|
||||||
gainResource: points,
|
gainResource: points,
|
||||||
roundUpCost: true,
|
roundUpCost: true,
|
||||||
gainModifier: createSequentialModifier(
|
gainModifier: createSequentialModifier(
|
||||||
createExponentialModifier(2),
|
createExponentialModifier(2, "Because I felt like it"),
|
||||||
createAdditiveModifier(1)
|
createAdditiveModifier(1, "Nice modifier")
|
||||||
)
|
)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -404,6 +412,10 @@ const layer = createLayer(id, () => {
|
||||||
textDecoration: "underline"
|
textDecoration: "underline"
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
addTooltip(treeNode, {
|
||||||
|
display: createResourceTooltip(points),
|
||||||
|
pinnable: true
|
||||||
|
});
|
||||||
|
|
||||||
const resetButton = createResetButton(() => ({
|
const resetButton = createResetButton(() => ({
|
||||||
conversion,
|
conversion,
|
||||||
|
@ -414,6 +426,19 @@ const layer = createLayer(id, () => {
|
||||||
},
|
},
|
||||||
resetDescription: "Melt your points into "
|
resetDescription: "Melt your points into "
|
||||||
}));
|
}));
|
||||||
|
addTooltip(resetButton, {
|
||||||
|
display: jsx(() =>
|
||||||
|
createModifierSection(
|
||||||
|
"Modifiers",
|
||||||
|
"",
|
||||||
|
conversion.gainModifier,
|
||||||
|
conversion.scaling.currentGain(conversion)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
pinnable: true,
|
||||||
|
direction: TooltipDirection.DOWN,
|
||||||
|
style: "width: 400px; text-align: left"
|
||||||
|
});
|
||||||
|
|
||||||
const g = createTreeNode(() => ({
|
const g = createTreeNode(() => ({
|
||||||
display: "TH",
|
display: "TH",
|
||||||
|
|
|
@ -9,6 +9,8 @@ import { createParticles } from "features/particles/particles";
|
||||||
import { createReset } from "features/reset";
|
import { createReset } from "features/reset";
|
||||||
import MainDisplay from "features/resources/MainDisplay.vue";
|
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||||
import { createResource, displayResource } from "features/resources/resource";
|
import { createResource, displayResource } from "features/resources/resource";
|
||||||
|
import { addTooltip } from "features/tooltips/tooltip";
|
||||||
|
import { createResourceTooltip } from "features/trees/tree";
|
||||||
import { createLayer } from "game/layers";
|
import { createLayer } from "game/layers";
|
||||||
import { createMultiplicativeModifier } from "game/modifiers";
|
import { createMultiplicativeModifier } from "game/modifiers";
|
||||||
import { persistent } from "game/persistence";
|
import { persistent } from "game/persistence";
|
||||||
|
@ -129,6 +131,10 @@ const layer = createLayer(id, () => {
|
||||||
return Decimal.gte(main.points.value, 10);
|
return Decimal.gte(main.points.value, 10);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
addTooltip(treeNode, {
|
||||||
|
display: createResourceTooltip(points),
|
||||||
|
pinnable: true
|
||||||
|
});
|
||||||
|
|
||||||
const resetButton = createResetButton(() => ({
|
const resetButton = createResetButton(() => ({
|
||||||
conversion,
|
conversion,
|
||||||
|
|
Loading…
Reference in a new issue