Files
settled-reach/client/ui/interaction_prompt.tscn
T
jpmschweitzerandClaude Opus 4.6 6bebbd9933 feat(client): add interaction prompt system (#405)
Server-driven interaction prompt that displays "E - Talk" when near
an interactable NPC. Decodes v4 nearby_interactions from snapshot,
stores in GameState, renders via InteractionPrompt UI with fade
animation. Extensible interface (get_interaction_target/get_selected_verb)
for future radial verb menu (v0.2).

- Protocol: decode nearby_interactions array with nested VerbOption structs,
  entity relationship/observation fields, tick_rate in GameTime
- GameState: store/clear nearby_interactions per snapshot
- SimBridge: test mode generates v4 format with structured verbs
- InteractionPrompt: PanelContainer with fade in/out, polls GameState
- Tests: 19 new test cases covering protocol, state, sim bridge, UI, encoding
- Fixture assertions updated for v4 protocol version

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:43:37 +01:00

29 lines
759 B
Plaintext

[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://ui/interaction_prompt.gd" id="1_prompt"]
[node name="InteractionPrompt" type="PanelContainer"]
anchors_preset = 7
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 200.0
offset_top = -60.0
offset_right = -200.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
script = ExtResource("1_prompt")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 8
[node name="PromptLabel" type="Label" parent="MarginContainer"]
layout_mode = 2
horizontal_alignment = 1
text = ""