From f48ff4b541b1ef877905bda248459460a943dd6e Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 7 Sep 2026 09:30:54 -0400 Subject: feat: restore multiplier buttons --- src/components/FpsMultiplierControl.tsx | 72 +++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 16 deletions(-) (limited to 'src/components/FpsMultiplierControl.tsx') diff --git a/src/components/FpsMultiplierControl.tsx b/src/components/FpsMultiplierControl.tsx index 1fd0e78..2c50be1 100644 --- a/src/components/FpsMultiplierControl.tsx +++ b/src/components/FpsMultiplierControl.tsx @@ -1,4 +1,4 @@ -import { Focusable, PanelSectionRow, SliderField } from "@decky/ui"; +import { DialogButton, Focusable, PanelSectionRow } from "@decky/ui"; import { useEffect, useRef } from "react"; import { ConfigurationData } from "../config/configSchema"; import { MULTIPLIER } from "../config/generatedConfigSchema"; @@ -31,23 +31,63 @@ export function FpsMultiplierControl({ return () => cancelAnimationFrame(frame); }, [autoFocus, onAutoFocus]); - const multiplierLabel = config.multiplier === 1 - ? t("MULTIPLIER_OFF", "Off") - : `${config.multiplier}x`; - return ( - - void onConfigChange(MULTIPLIER, value)} - /> + + void onConfigChange(MULTIPLIER, Math.max(1, config.multiplier - 1))} + disabled={config.multiplier <= 1} + > + − + +
4 ? "red" : "white", + minWidth: "60px", + textAlign: "center", + }} + > + {config.multiplier < 2 ? t("MULTIPLIER_OFF", "OFF") : `${config.multiplier}X`} +
+ void onConfigChange(MULTIPLIER, Math.min(4, config.multiplier + 1))} + disabled={config.multiplier >= 4} + > + + +
); -- cgit v1.2.3