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 { createTab } from "features/tabs/tab";
|
||||
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 { createLayer } from "game/layers";
|
||||
import {
|
||||
createAdditiveModifier,
|
||||
createExponentialModifier,
|
||||
createModifierSection,
|
||||
createSequentialModifier
|
||||
} from "game/modifiers";
|
||||
import { persistent } from "game/persistence";
|
||||
|
@ -357,8 +365,8 @@ const layer = createLayer(id, () => {
|
|||
gainResource: points,
|
||||
roundUpCost: true,
|
||||
gainModifier: createSequentialModifier(
|
||||
createExponentialModifier(2),
|
||||
createAdditiveModifier(1)
|
||||
createExponentialModifier(2, "Because I felt like it"),
|
||||
createAdditiveModifier(1, "Nice modifier")
|
||||
)
|
||||
}));
|
||||
|
||||
|
@ -404,6 +412,10 @@ const layer = createLayer(id, () => {
|
|||
textDecoration: "underline"
|
||||
}
|
||||
}));
|
||||
addTooltip(treeNode, {
|
||||
display: createResourceTooltip(points),
|
||||
pinnable: true
|
||||
});
|
||||
|
||||
const resetButton = createResetButton(() => ({
|
||||
conversion,
|
||||
|
@ -414,6 +426,19 @@ const layer = createLayer(id, () => {
|
|||
},
|
||||
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(() => ({
|
||||
display: "TH",
|
||||
|
|
|
@ -9,6 +9,8 @@ import { createParticles } from "features/particles/particles";
|
|||
import { createReset } from "features/reset";
|
||||
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||
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 { createMultiplicativeModifier } from "game/modifiers";
|
||||
import { persistent } from "game/persistence";
|
||||
|
@ -129,6 +131,10 @@ const layer = createLayer(id, () => {
|
|||
return Decimal.gte(main.points.value, 10);
|
||||
}
|
||||
}));
|
||||
addTooltip(treeNode, {
|
||||
display: createResourceTooltip(points),
|
||||
pinnable: true
|
||||
});
|
||||
|
||||
const resetButton = createResetButton(() => ({
|
||||
conversion,
|
||||
|
|
Loading…
Reference in a new issue