Add tooltip to example layer

This commit is contained in:
thepaperpilot 2022-04-23 22:23:46 -05:00
parent f1e5f177bf
commit b161151424

View file

@ -8,6 +8,8 @@ import { jsx } from "features/feature";
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 } from "features/resources/resource"; import { createResource } 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 { DecimalSource } from "util/bignum"; import { DecimalSource } from "util/bignum";
import { render } from "util/vue"; import { render } from "util/vue";
@ -35,6 +37,10 @@ const layer = createLayer(id, () => {
color, color,
reset reset
})); }));
addTooltip(treeNode, {
display: createResourceTooltip(points),
pinnable: true
});
const resetButton = createResetButton(() => ({ const resetButton = createResetButton(() => ({
conversion, conversion,