# Show a Prompt and Timed Progress

> For the complete documentation index, see [llms.txt](llms.txt).

Show Search above a terminal and fill a bar while its [State Tree search](int-adv-interaction-duration.html) is running. Use the supplied `W_Interaction` widget as a starting point, or create a widget derived from Interaction Prompt Widget.

Procedure: Connect the prompt to the terminal

1. Add an Interaction Widget Component to the terminal and assign the prompt widget as its widget class. Position it above the mesh. This component supplies the target actor to the widget.

2. For a custom widget, add the Interaction Target ViewModel with creation type Resolver and choose the Interaction Resolver. It binds the widget to the owning player and its target. Add an Interaction Summary ViewModel with Manual creation. Bind Get Focused Interaction Summaries to the prompt's Update Focused Summary and display the selected summary's Display Text. Use a priority or tag query if the target offers several actions.

3. For the progress bar, use Get Active Interaction Summary on the target ViewModel. Bind it to the prompt's Update Active Summary, then bind Get Elapsed Time Percent to the bar's Percent. Show the bar while the interaction is accumulating time and hide it on finish or cancellation.

![Interaction Widget Component positioned on a target](Documentation/int_ui_widget_component_on_target.png)

## Put the Prompt on the HUD

For a single prompt near the crosshair, create the widget for the local player. Listen to the pawn manager's `OnFocusStateChanged` and pass the focused target actor through Set Interaction Target. Clear the old target when focus leaves, and bind the new target's summaries. For a search already underway, keep the progress bar bound to the active summary through completion. For an [input-timed hold](int-guide-hold-input.html), fill the bar from the pending local input's elapsed time.

## Customize the Feedback

On Interaction Prompt Widget, override `NotifyInteractionPresented` and `NotifyInteractionDismissed` to fade the label, `NotifyProgressStarted` and `NotifyProgressStopped` to show or hide the bar, and `NotifyInteractionCompleted` or `NotifyInteractionCancelled` for the outcome. The Interaction Summary ViewModel exposes the text, type, priority, duration, and elapsed percentage for one slot.

## Try It in Play

Face the terminal, start a two-second search, then cancel halfway through. The label should identify the terminal, and the bar should hide and start empty on the next attempt. If the label is correct but the bar never fills, check that its binding follows the active summary and that the tree started time accumulation.

