Rewrites the monologue display system per Tyre architecture review (Sprint 14): Rendering: - Up to 3 simultaneous visible lines (VBoxContainer, dynamic node creation) - Lines created programmatically as MarginContainer > RichTextLabel per slot - Percentage-based anchors: 5% left, 75–98% vertical (25% area from bottom), 50% max width - Z-layer 7 in UILayer (CanvasLayer 20, D-049) Queue: - 5-entry priority queue; highest priority drains first - On overflow: incoming line replaces lowest-priority queued entry if it outranks it - Lower/equal priority incoming lines silently dropped when queue full API: show_monologue(text, duration, priority=2, is_urgent=false) - Replaces old (text, duration, character_type) signature - main.gd passes priority and is_urgent from MonologueEvent fields - Confrontation monologue: priority=3, is_urgent=true (D-063) Colour: - Reads GameState.lattice_profile at render time (D-032) - lattice_augmented (detective): standard #d0d4e0 / urgent #e0e8f8 - lattice_baseline (smuggler): standard #d8d0c4 / urgent #f0e4d4 - Fallback for unknown profiles; no crash Stagger: 0.15s between consecutive fade-ins (spec §5.4) Opacity: standard 0.85, urgent 1.0; bloom deferred GameState: adds lattice_profile field, parsed from snapshot Tests: 27 gdUnit4 test cases — queue order, priority drop, overflow, stagger, no-overwrite (P0 #477), BBCode output, palette selection, slot lifecycle Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
753 B
Plaintext
24 lines
753 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
|
|
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
|