From 07fcccd0e42b4f72754360309731b14c5be4c909 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 8 Oct 2022 15:57:09 -0500 Subject: [PATCH] Add hotkey to default layer --- src/data/layers/prestige.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/data/layers/prestige.tsx b/src/data/layers/prestige.tsx index 8216af1..4490ded 100644 --- a/src/data/layers/prestige.tsx +++ b/src/data/layers/prestige.tsx @@ -5,6 +5,7 @@ import { main } from "data/projEntry"; import { createCumulativeConversion, createPolynomialScaling } from "features/conversion"; import { jsx } from "features/feature"; +import { createHotkey } from "features/hotkey"; import { createReset } from "features/reset"; import MainDisplay from "features/resources/MainDisplay.vue"; import { createResource } from "features/resources/resource"; @@ -48,6 +49,12 @@ const layer = createLayer(id, function (this: BaseLayer) { treeNode })); + const hotkey = createHotkey(() => ({ + description: "Reset for prestige points", + key: "p", + onPress: resetButton.onClick + })); + return { name, color, @@ -58,7 +65,8 @@ const layer = createLayer(id, function (this: BaseLayer) { {render(resetButton)} )), - treeNode + treeNode, + hotkey }; });