Compare commits

...

3 Commits

8 changed files with 127 additions and 132 deletions

View File

@ -1,8 +1,8 @@
extends Station
func _ready() -> void:
%PlayerDetect.body_entered.connect(func(body):
%PlayerDetect.body_entered.connect(func(body):
if visible and body is PlayerController:
State.room.save_game.subway_burnout = true
await Main.curtain.black()
await Main.curtain.black()
State.room.proceed.emit(Main.adulthood_room_path))

View File

@ -251,6 +251,109 @@ autoplay = true
panning_strength = 0.5
bus = &"sfx"
[node name="Collision" type="StaticBody3D" parent="Logic/Fahrplan/hirschfeld" unique_id=1981379044]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.015596004, -0.007891655, 0.018885009)
[node name="World Boundary (Floor)" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=836708414]
shape = SubResource("WorldBoundaryShape3D_rkl48")
debug_color = Color(0.5019608, 0.003921569, 0.9607843, 1)
[node name="CollisionShape3D3" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1454083655]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, -66.5)
shape = SubResource("BoxShape3D_yfan7")
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=401580690]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, 0.25)
shape = SubResource("BoxShape3D_yfan7")
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1029621015]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.8523458, 1, -1.1576476)
shape = SubResource("BoxShape3D_il5go")
[node name="CollisionShape3D7" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1662055133]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.567, 1.031, -2)
shape = SubResource("BoxShape3D_iq74k")
[node name="CollisionShape3D8" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=402007193]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.567, 1.031, -2)
shape = SubResource("BoxShape3D_biibr")
[node name="CollisionShape3D9" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1576481142]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0, 1.031, -2)
shape = SubResource("BoxShape3D_rum2v")
[node name="CollisionShape3D10" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1452079625]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -7.783883)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D11" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1008810294]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -9.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D12" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=541853028]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -17.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D13" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=677607764]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -19.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D14" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1293358347]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -16.102852)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D15" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=985616557]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -27.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D16" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=801985133]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -29.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D17" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=197748420]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -26.102852)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D18" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=761326610]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -37.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D19" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1342889226]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -39.457428)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D20" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1047602758]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -36.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D21" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1841460790]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -47.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D22" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=312700908]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -49.457428)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D23" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1015805918]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -46.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D24" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=1122736393]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -57.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D26" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=2021914520]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -56.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D6" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=458997453]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.8618617, 1, -1.1576476)
shape = SubResource("BoxShape3D_il5go")
[node name="train" type="CollisionShape3D" parent="Logic/Fahrplan/hirschfeld/Collision" unique_id=595610224]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0680046, -0.24993896, -32.189793)
shape = SubResource("BoxShape3D_rcbu2")
[node name="uni_mensa" parent="Logic/Fahrplan" unique_id=304084571 instance=ExtResource("9_bdj4u")]
visible = false
script = ExtResource("10_iq74k")
@ -444,108 +547,6 @@ render_target_update_mode = 4
[node name="SubwayMap" parent="Logic/Fahrplan/parity_square/SubwayMap3D/MapViewport" unique_id=118012432 instance=ExtResource("8_rcbu2")]
[node name="Collision" type="StaticBody3D" parent="Logic" unique_id=1981379044]
[node name="World Boundary (Floor)" type="CollisionShape3D" parent="Logic/Collision" unique_id=836708414]
shape = SubResource("WorldBoundaryShape3D_rkl48")
debug_color = Color(0.5019608, 0.003921569, 0.9607843, 1)
[node name="CollisionShape3D3" type="CollisionShape3D" parent="Logic/Collision" unique_id=1454083655]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, -66.5)
shape = SubResource("BoxShape3D_yfan7")
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Logic/Collision" unique_id=401580690]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.143, 1, 0.25)
shape = SubResource("BoxShape3D_yfan7")
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Logic/Collision" unique_id=1029621015]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.8523458, 1, -1.1576476)
shape = SubResource("BoxShape3D_il5go")
[node name="CollisionShape3D7" type="CollisionShape3D" parent="Logic/Collision" unique_id=1662055133]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.567, 1.031, -2)
shape = SubResource("BoxShape3D_iq74k")
[node name="CollisionShape3D8" type="CollisionShape3D" parent="Logic/Collision" unique_id=402007193]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.567, 1.031, -2)
shape = SubResource("BoxShape3D_biibr")
[node name="CollisionShape3D9" type="CollisionShape3D" parent="Logic/Collision" unique_id=1576481142]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0, 1.031, -2)
shape = SubResource("BoxShape3D_rum2v")
[node name="CollisionShape3D10" type="CollisionShape3D" parent="Logic/Collision" unique_id=1452079625]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -7.783883)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D11" type="CollisionShape3D" parent="Logic/Collision" unique_id=1008810294]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -9.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D12" type="CollisionShape3D" parent="Logic/Collision" unique_id=541853028]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -17.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D13" type="CollisionShape3D" parent="Logic/Collision" unique_id=677607764]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -19.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D14" type="CollisionShape3D" parent="Logic/Collision" unique_id=1293358347]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -16.102852)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D15" type="CollisionShape3D" parent="Logic/Collision" unique_id=985616557]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -27.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D16" type="CollisionShape3D" parent="Logic/Collision" unique_id=801985133]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -29.45743)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D17" type="CollisionShape3D" parent="Logic/Collision" unique_id=197748420]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -26.102852)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D18" type="CollisionShape3D" parent="Logic/Collision" unique_id=761326610]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -37.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D19" type="CollisionShape3D" parent="Logic/Collision" unique_id=1342889226]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -39.457428)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D20" type="CollisionShape3D" parent="Logic/Collision" unique_id=1047602758]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -36.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D21" type="CollisionShape3D" parent="Logic/Collision" unique_id=1841460790]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -47.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D22" type="CollisionShape3D" parent="Logic/Collision" unique_id=312700908]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -49.457428)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D23" type="CollisionShape3D" parent="Logic/Collision" unique_id=1015805918]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -46.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D24" type="CollisionShape3D" parent="Logic/Collision" unique_id=1122736393]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.5282154e-07, 1.031, -57.783882)
shape = SubResource("BoxShape3D_ii0j1")
[node name="CollisionShape3D26" type="CollisionShape3D" parent="Logic/Collision" unique_id=2021914520]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 3.259746e-07, 0.29198635, -56.10285)
shape = SubResource("BoxShape3D_ltric")
[node name="CollisionShape3D6" type="CollisionShape3D" parent="Logic/Collision" unique_id=458997453]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -1.8618617, 1, -1.1576476)
shape = SubResource("BoxShape3D_il5go")
[node name="train" type="CollisionShape3D" parent="Logic/Collision" unique_id=595610224]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.0680046, -0.24993896, -32.189793)
shape = SubResource("BoxShape3D_rcbu2")
[node name="MapViewport" type="SubViewport" parent="Logic" unique_id=1028638766]
disable_3d = true
size = Vector2i(2896, 2048)

View File

@ -12,7 +12,7 @@ signal closed
is_memory_board = is_memory
if is_node_ready():
%CardboardBox.visible = is_memory
var all_names : Array[StringName] = []
var notes : Array[StickyNote] = []
@ -167,14 +167,14 @@ func _ensure_unique(items: Array[StringName]) -> Array[StringName]:
if item not in result: result.append(item)
else: push_warning("card-board.gd: ", "discarding non-unique item ", item)
return result
## Spawn Cards and Post-Its
# TODO: rename to "add to board"
func populate_board(names: Array[StringName]):
mementos_collected += 1
names = _ensure_unique(names)
var all_new:Dictionary = HardCards.get_cards_by_name_array(names)
all_names.append_array(all_new.keys())

View File

@ -23,7 +23,6 @@ shape = SubResource("RectangleShape2D_mai6h")
scale = Vector2(0.6, 0.6)
sprite_frames = ExtResource("2_mai6h")
animation = &"youth"
autoplay = "youth"
[node name="Label" type="Label" parent="." unique_id=1847219475]
anchors_preset = 15

View File

@ -30,7 +30,6 @@ position = Vector2(99.5, 0)
scale = Vector2(0.65, 0.65)
sprite_frames = ExtResource("2_260t4")
animation = &"youth"
autoplay = "youth"
[node name="Label" type="Label" parent="Content" unique_id=1176239183]
anchors_preset = 8

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://b1pv7j1hag5m3"]
[gd_scene format=3 uid="uid://b1pv7j1hag5m3"]
[ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="1_1f64j"]
[ext_resource type="FontFile" uid="uid://bmh8v44f6txfo" path="res://import/fonts/Ubuntu-RI.ttf" id="2_n65mw"]
@ -29,24 +29,20 @@ VBoxContainer/constants/separation = 9
script = ExtResource("5_1hd2w")
text = "Sorry"
time_string = "This is smol."
is_own_message = false
metadata/_custom_type_script = "uid://be16bo6mf4kqu"
[sub_resource type="Resource" id="Resource_1hd2w"]
script = ExtResource("5_1hd2w")
text = "I never knew what to say. Can I write instead?"
time_string = ""
is_own_message = false
metadata/_custom_type_script = "uid://be16bo6mf4kqu"
[sub_resource type="Resource" id="Resource_w8y7q"]
script = ExtResource("5_1hd2w")
text = "🙄"
time_string = ""
is_own_message = true
metadata/_custom_type_script = "uid://be16bo6mf4kqu"
[node name="Control" type="Control"]
[node name="Control" type="Control" unique_id=306300003]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -55,7 +51,7 @@ grow_horizontal = 2
grow_vertical = 2
theme = SubResource("Theme_w8y7q")
[node name="ScrollContainer" type="ScrollContainer" parent="."]
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=124411261]
layout_mode = 0
offset_right = 582.0
offset_bottom = 1082.0
@ -63,18 +59,18 @@ theme = SubResource("Theme_w8y7q")
script = ExtResource("4_n65mw")
messages = Array[ExtResource("5_1hd2w")]([SubResource("Resource_iwd5k"), SubResource("Resource_1hd2w"), SubResource("Resource_w8y7q")])
[node name="Template" type="ScrollContainer" parent="."]
layout_mode = 2
[node name="Template" type="ScrollContainer" parent="." unique_id=1981714851]
layout_mode = 0
offset_left = 1061.0
offset_top = 78.0
offset_right = 1643.0
offset_bottom = 702.0
[node name="VBoxContainer" type="VBoxContainer" parent="Template"]
[node name="VBoxContainer" type="VBoxContainer" parent="Template" unique_id=1303301180]
layout_mode = 2
size_flags_horizontal = 3
[node name="RichTextLabel2" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel2" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=1558665125]
layout_mode = 2
size_flags_horizontal = 0
theme = SubResource("Theme_w8y7q")
@ -87,7 +83,7 @@ fit_content = true
scroll_active = false
autowrap_mode = 0
[node name="RichTextLabel3" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel3" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=1220988641]
layout_mode = 2
theme = SubResource("Theme_w8y7q")
bbcode_enabled = true
@ -95,7 +91,7 @@ text = "Dies ist eine Telegram-Message
[i]8:12 PM[/i]"
fit_content = true
[node name="RichTextLabel4" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel4" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=443052553]
layout_mode = 2
theme = SubResource("Theme_w8y7q")
bbcode_enabled = true
@ -103,7 +99,7 @@ text = "Dies ist eine Telegram-Message
[i]8:12 PM[/i]"
fit_content = true
[node name="RichTextLabel5" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel5" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=1955305073]
layout_mode = 2
theme = SubResource("Theme_w8y7q")
bbcode_enabled = true
@ -112,7 +108,7 @@ text = "Dies ist eine Telegram-Message
fit_content = true
horizontal_alignment = 2
[node name="RichTextLabel6" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel6" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=1577640143]
layout_mode = 2
theme = SubResource("Theme_w8y7q")
bbcode_enabled = true
@ -120,7 +116,7 @@ text = "Dies ist eine Telegram-Message
[i]8:12 PM[/i]"
fit_content = true
[node name="RichTextLabel" type="RichTextLabel" parent="Template/VBoxContainer"]
[node name="RichTextLabel" type="RichTextLabel" parent="Template/VBoxContainer" unique_id=1513469081]
layout_mode = 2
size_flags_horizontal = 3
theme = SubResource("Theme_w8y7q")

View File

@ -8,23 +8,23 @@ func _ready() -> void:
v_box = VBoxContainer.new()
add_child(v_box, false, Node.INTERNAL_MODE_BACK)
rebuild()
func rebuild():
for child in v_box.get_children():
child.free()
var text_server: = TextServerManager.get_primary_interface()
for message in messages:
var shaped_tex: RID = text_server.create_shaped_text(TextServer.DIRECTION_AUTO, TextServer.ORIENTATION_HORIZONTAL)
text_server.shaped_text_add_string(shaped_tex, message.text, [theme.default_font.get_rid()], theme.default_base_scale)
text_server.shaped_text_fit_to_width(shaped_tex, size.x)
var label: = RichTextLabel.new()
label.custom_minimum_size = text_server.shaped_text_get_size(shaped_tex) + Vector2( 16, 16 )
label.text = message.text
label.size_flags_horizontal = Control.SIZE_SHRINK_END if message.is_own_message else Control.SIZE_SHRINK_BEGIN
v_box.add_child(label)