From 94d30252dfe4454f55df5dee030f1d808ab681c5 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 27 Apr 2026 15:40:47 +0200 Subject: [PATCH] Improve interaction prompt display to include gamepad bindings --- src/app/App.tsx | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 2af1ed58..6a124197 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -13255,6 +13255,18 @@ export function App({ store, initialStatusMessage }: AppProps) { : undefined; if (editorState.toolMode === "play" && runtimeScene !== null) { + const runtimeInteractKeyboardBinding = + runtimeScene.playerInputBindings.keyboard.interact; + const runtimeInteractKeyboardInstruction = isPlayerStartMouseBindingCode( + runtimeInteractKeyboardBinding + ) + ? `Click ${formatPlayerStartKeyboardBindingLabel(runtimeInteractKeyboardBinding)}` + : `Press ${formatPlayerStartKeyboardBindingLabel(runtimeInteractKeyboardBinding)}`; + const runtimeInteractGamepadInstruction = `press ${formatPlayerStartGamepadActionBindingLabel( + runtimeScene.playerInputBindings.gamepad.interact + )}`; + const runtimeInteractInstruction = `${runtimeInteractKeyboardInstruction} or ${runtimeInteractGamepadInstruction}`; + return (
@@ -13481,8 +13493,8 @@ export function App({ store, initialStatusMessage }: AppProps) { data-testid="runner-interaction-summary" > {runtimeInteractionPrompt === null - ? "Aim at an authored Interactable or NPC and click when a prompt appears." - : `Click "${runtimeInteractionPrompt.prompt}" within ${runtimeInteractionPrompt.range.toFixed(1)}m.`} + ? `Aim at an authored Interactable or NPC. ${runtimeInteractInstruction} when a prompt appears.` + : `${runtimeInteractInstruction} "${runtimeInteractionPrompt.prompt}" within ${runtimeInteractionPrompt.range.toFixed(1)}m.`}
@@ -13499,11 +13511,10 @@ export function App({ store, initialStatusMessage }: AppProps) { {
- Mouse click activates the current prompt target. - Keyboard/controller fallback is not active yet. -
+ data-testid="runner-interaction-help" + > + Interact binding: {runtimeInteractInstruction}. + }