Add hotkey to default layer

This commit is contained in:
thepaperpilot 2022-10-08 15:57:09 -05:00
parent e91d971532
commit 07fcccd0e4

View file

@ -5,6 +5,7 @@
import { main } from "data/projEntry"; import { main } from "data/projEntry";
import { createCumulativeConversion, createPolynomialScaling } from "features/conversion"; import { createCumulativeConversion, createPolynomialScaling } from "features/conversion";
import { jsx } from "features/feature"; import { jsx } from "features/feature";
import { createHotkey } from "features/hotkey";
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";
@ -48,6 +49,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
treeNode treeNode
})); }));
const hotkey = createHotkey(() => ({
description: "Reset for prestige points",
key: "p",
onPress: resetButton.onClick
}));
return { return {
name, name,
color, color,
@ -58,7 +65,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
{render(resetButton)} {render(resetButton)}
</> </>
)), )),
treeNode treeNode,
hotkey
}; };
}); });