import { PanelSectionRow, ToggleField, SliderField, DropdownItem } from "@decky/ui"; import { ConfigurationData } from "../config/configSchema"; interface ConfigurationSectionProps { config: ConfigurationData; onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string) => Promise; } export function ConfigurationSection({ config, onConfigChange }: ConfigurationSectionProps) { return ( <>
LSFG Configuration
onConfigChange('multiplier', value)} /> onConfigChange('flow_scale', value)} /> onConfigChange('performance_mode', value)} /> onConfigChange('hdr_mode', value)} />
Experimental Features
onConfigChange('experimental_present_mode', value.data)} rgOptions={[ { data: "fifo", label: "FIFO (VSync) - Default" }, { data: "mailbox", label: "Mailbox" } ]} />
Environment Variables
Must be toggled before game start or restart game to take effect
0 ? ` (${config.dxvk_frame_rate} FPS)` : ' (Off)'}`} description="Base framerate cap for DirectX games, before frame multiplier" value={config.dxvk_frame_rate} min={0} max={60} step={1} onChange={(value) => onConfigChange('dxvk_frame_rate', value)} /> onConfigChange('enable_wow64', value)} /> onConfigChange('disable_steamdeck_mode', value)} /> onConfigChange('mangohud_workaround', value)} /> onConfigChange('disable_vkbasalt', value)} /> onConfigChange('foobar_toggle', value)} />
Test Config Only Field
onConfigChange('test_config_only', e.target.value)} placeholder="Enter test value" style={{ width: "100%", padding: "8px", borderRadius: "4px", border: "1px solid #4c4c4c", backgroundColor: "#2d2d2d", color: "#ffffff" }} />
Test TOML-only configuration field (not in script)
); }