Files
settled-reach/client/ui/monologue_display.tscn
T
jpmschweitzerandClaude Sonnet 4.6 677ca9b59d fix(ui): address PR #49 review — 6 warnings + 2 suggestions (#122)
Warnings fixed:
- BBCode injection (line 153): escape [ → [lb] in server text before interpolation
- sort_custom on silent-drop (line 125): sort now only runs on actual insertion/replacement
- clip_contents: add clip_contents=true to MonologueDisplay Control (overflow guard)
- confrontation tick guard (main.gd): _last_confrontation_tick deduplicates same-tick signals
- GameState decoupling: show_monologue() reads lattice_profile once and passes it through
  _show_line() → _build_line_node(); renderer no longer reaches into autoload (D-020)
- Equal-priority eviction: >= tiebreak (was >); FIFO for equal-priority queue overflow

Suggestions fixed:
- Minimum duration clamp: maxf(duration, FADE_IN_SEC + 0.1) — line survives own fade-in
- _label_text bounds check: guard against empty _visible before indexing [0]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 19:06:26 +01:00

25 lines
774 B
Plaintext

[gd_scene load_steps=2 format=3 uid="uid://bj8y4v2nx7k5m"]
[ext_resource type="Script" path="res://ui/monologue_display.gd" id="1_monologue"]
; Monologue display area — bottom-left of viewport.
; Anchors: 5% left margin, 50% max width, 25% height from bottom (spec §3.1, z-layer 7).
; Lines are created dynamically inside VBoxContainer by monologue_display.gd.
[node name="MonologueDisplay" type="Control"]
layout_mode = 1
anchor_left = 0.05
anchor_top = 0.75
anchor_right = 0.55
anchor_bottom = 0.98
grow_horizontal = 1
grow_vertical = 0
clip_contents = true
mouse_filter = 2
script = ExtResource("1_monologue")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchor_right = 1.0
anchor_bottom = 1.0
theme_override_constants/separation = 4