diff --git a/src/base-environments/transition/stations/burnout_station.gd b/src/base-environments/transition/stations/burnout_station.gd index 55026d06..9dd6428e 100644 --- a/src/base-environments/transition/stations/burnout_station.gd +++ b/src/base-environments/transition/stations/burnout_station.gd @@ -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)) diff --git a/src/base-environments/transition/subway_sequence.tscn b/src/base-environments/transition/subway_sequence.tscn index 6a9db38d..6c3bf743 100644 --- a/src/base-environments/transition/subway_sequence.tscn +++ b/src/base-environments/transition/subway_sequence.tscn @@ -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) diff --git a/src/import/fonts/Ubuntu-R.ttf.import b/src/import/fonts/Ubuntu-R.ttf.import index c2864c68..5cae6441 100644 --- a/src/import/fonts/Ubuntu-R.ttf.import +++ b/src/import/fonts/Ubuntu-R.ttf.import @@ -18,7 +18,7 @@ generate_mipmaps=false disable_embedded_bitmaps=true multichannel_signed_distance_field=true msdf_pixel_range=8 -msdf_size=48 +msdf_size=64 allow_system_fallback=true force_autohinter=false modulate_color_glyphs=false @@ -34,7 +34,8 @@ preload=[{ "chars": [], "glyphs": [], "name": "New Configuration", -"size": Vector2i(16, 0) +"size": Vector2i(16, 0), +&"variation_embolden": 0.0 }] language_support={} script_support={} diff --git a/src/logic-scenes/board/card-board.gd b/src/logic-scenes/board/card-board.gd index 5cf92db9..7c604631 100644 --- a/src/logic-scenes/board/card-board.gd +++ b/src/logic-scenes/board/card-board.gd @@ -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()) diff --git a/src/logic-scenes/board/card.tscn b/src/logic-scenes/board/card.tscn index 412c6120..06e70238 100644 --- a/src/logic-scenes/board/card.tscn +++ b/src/logic-scenes/board/card.tscn @@ -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 diff --git a/src/logic-scenes/board/sticky-note.tscn b/src/logic-scenes/board/sticky-note.tscn index 05982ea4..1dc9dae2 100644 --- a/src/logic-scenes/board/sticky-note.tscn +++ b/src/logic-scenes/board/sticky-note.tscn @@ -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 diff --git a/src/logic-scenes/chat_view/avatar-other-large.png b/src/logic-scenes/chat_view/avatar-other-large.png new file mode 100644 index 00000000..28d90873 --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-other-large.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33e1395654a919bea0733614d02d4c663e7e0b88a8345a51656634e5e09f9170 +size 10959 diff --git a/src/logic-scenes/chat_view/avatar-other-large.png.import b/src/logic-scenes/chat_view/avatar-other-large.png.import new file mode 100644 index 00000000..2e14440e --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-other-large.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dw5d2ffpq8w3r" +path="res://.godot/imported/avatar-other-large.png-13bb73d673b58a9200359552f01269ba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/avatar-other-large.png" +dest_files=["res://.godot/imported/avatar-other-large.png-13bb73d673b58a9200359552f01269ba.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/avatar-other.png b/src/logic-scenes/chat_view/avatar-other.png new file mode 100644 index 00000000..eff78288 --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-other.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d724173c6af0a9246a418073356e047ffff4a60ceba78d9616290f1d8bf6cd +size 3159 diff --git a/src/logic-scenes/chat_view/avatar-other.png.import b/src/logic-scenes/chat_view/avatar-other.png.import new file mode 100644 index 00000000..7cb4a7ad --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-other.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkqsw8nh2crhq" +path="res://.godot/imported/avatar-other.png-09f69875162e2f76b5a47c0d287cd91e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/avatar-other.png" +dest_files=["res://.godot/imported/avatar-other.png-09f69875162e2f76b5a47c0d287cd91e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/avatar-self.png b/src/logic-scenes/chat_view/avatar-self.png new file mode 100644 index 00000000..eff78288 --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-self.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d724173c6af0a9246a418073356e047ffff4a60ceba78d9616290f1d8bf6cd +size 3159 diff --git a/src/logic-scenes/chat_view/avatar-self.png.import b/src/logic-scenes/chat_view/avatar-self.png.import new file mode 100644 index 00000000..e3e720b9 --- /dev/null +++ b/src/logic-scenes/chat_view/avatar-self.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dekaqj10p8rqk" +path="res://.godot/imported/avatar-self.png-01f4d75fe95c2d322095af684ab1d9a8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/avatar-self.png" +dest_files=["res://.godot/imported/avatar-self.png-01f4d75fe95c2d322095af684ab1d9a8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/chat-conversation.gd b/src/logic-scenes/chat_view/chat-conversation.gd new file mode 100644 index 00000000..654406f4 --- /dev/null +++ b/src/logic-scenes/chat_view/chat-conversation.gd @@ -0,0 +1,2 @@ +class_name ChatConversation extends Resource +@export var messages: Array[ChatMessage] diff --git a/src/logic-scenes/chat_view/chat-conversation.gd.uid b/src/logic-scenes/chat_view/chat-conversation.gd.uid new file mode 100644 index 00000000..b8f53c49 --- /dev/null +++ b/src/logic-scenes/chat_view/chat-conversation.gd.uid @@ -0,0 +1 @@ +uid://c8hqd1leg4dfy diff --git a/src/logic-scenes/chat_view/chat-bubble.gd b/src/logic-scenes/chat_view/chat-message.gd similarity index 100% rename from src/logic-scenes/chat_view/chat-bubble.gd rename to src/logic-scenes/chat_view/chat-message.gd diff --git a/src/logic-scenes/chat_view/chat-bubble.gd.uid b/src/logic-scenes/chat_view/chat-message.gd.uid similarity index 100% rename from src/logic-scenes/chat_view/chat-bubble.gd.uid rename to src/logic-scenes/chat_view/chat-message.gd.uid diff --git a/src/logic-scenes/chat_view/chat-view-protoyping.tscn b/src/logic-scenes/chat_view/chat-view-protoyping.tscn deleted file mode 100644 index e6c50c6b..00000000 --- a/src/logic-scenes/chat_view/chat-view-protoyping.tscn +++ /dev/null @@ -1,130 +0,0 @@ -[gd_scene load_steps=11 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"] -[ext_resource type="FontFile" uid="uid://b0i5ipn75noh6" path="res://import/fonts/Ubuntu-R.ttf" id="3_1hd2w"] -[ext_resource type="Script" uid="uid://db7t2kqbsskoq" path="res://logic-scenes/chat_view/chat-view.gd" id="4_n65mw"] -[ext_resource type="Script" uid="uid://be16bo6mf4kqu" path="res://logic-scenes/chat_view/chat-bubble.gd" id="5_1hd2w"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iwd5k"] -content_margin_left = 12.0 -content_margin_top = 8.0 -content_margin_right = 12.0 -content_margin_bottom = 8.0 -bg_color = Color(0.757003, 0.509749, 0.667446, 1) -border_color = Color(0.8, 0.8, 0.8, 0) -corner_radius_top_left = 20 -corner_radius_top_right = 20 -corner_radius_bottom_right = 20 - -[sub_resource type="Theme" id="Theme_w8y7q"] -default_font = ExtResource("3_1hd2w") -default_font_size = 24 -RichTextLabel/fonts/bold_font = ExtResource("1_1f64j") -RichTextLabel/fonts/italics_font = ExtResource("2_n65mw") -RichTextLabel/styles/normal = SubResource("StyleBoxFlat_iwd5k") -VBoxContainer/constants/separation = 9 - -[sub_resource type="Resource" id="Resource_iwd5k"] -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"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme = SubResource("Theme_w8y7q") - -[node name="ScrollContainer" type="ScrollContainer" parent="."] -layout_mode = 0 -offset_right = 582.0 -offset_bottom = 1082.0 -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 -offset_left = 1061.0 -offset_top = 78.0 -offset_right = 1643.0 -offset_bottom = 702.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="Template"] -layout_mode = 2 -size_flags_horizontal = 3 - -[node name="RichTextLabel2" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 0 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message. -Ich schreibe mal etwas länger, ob zu sehen, -ob der Bums irgendwann umbricht. -[i]8:12 PM[/i]" -fit_content = true -scroll_active = false -autowrap_mode = 0 - -[node name="RichTextLabel3" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message -[i]8:12 PM[/i]" -fit_content = true - -[node name="RichTextLabel4" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message -[i]8:12 PM[/i]" -fit_content = true - -[node name="RichTextLabel5" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message -[i]8:12 PM[/i]" -fit_content = true -horizontal_alignment = 2 - -[node name="RichTextLabel6" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message -[i]8:12 PM[/i]" -fit_content = true - -[node name="RichTextLabel" type="RichTextLabel" parent="Template/VBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -theme = SubResource("Theme_w8y7q") -bbcode_enabled = true -text = "Dies ist eine Telegram-Message, die deutlich länger ist, als die vorherige, um das mal abzuschätzen. -[i]8:12 PM[/i]" -fit_content = true diff --git a/src/logic-scenes/chat_view/chat-view.gd b/src/logic-scenes/chat_view/chat-view.gd index b8f673d9..316ae77f 100644 --- a/src/logic-scenes/chat_view/chat-view.gd +++ b/src/logic-scenes/chat_view/chat-view.gd @@ -1,30 +1,19 @@ -class_name ChatView extends ScrollContainer +class_name ChatView extends Control -@export var messages: Array[ChatMessage] +@export var conversation : ChatConversation +@export var scroll_offset := 220 -var v_box: VBoxContainer +var prefab_other: PackedScene = preload("res://logic-scenes/chat_view/message_other.tscn") +var prefab_self: PackedScene = preload("res://logic-scenes/chat_view/message_self.tscn") 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) + rebuild.call_deferred() + +func rebuild() -> void: + for message in conversation.messages: + var bubble : ChatBubble = prefab_self.instantiate() if message.is_own_message else prefab_other.instantiate() + %ChatHistory.add_child(bubble) + bubble.set_text.call_deferred(message.text, message.time_string) + + await get_tree().process_frame + %ChatContainer.scroll_vertical = scroll_offset diff --git a/src/logic-scenes/chat_view/chat-view.tscn b/src/logic-scenes/chat_view/chat-view.tscn new file mode 100644 index 00000000..ba5ce01b --- /dev/null +++ b/src/logic-scenes/chat_view/chat-view.tscn @@ -0,0 +1,182 @@ +[gd_scene format=3 uid="uid://dgb7x8na0ek57"] + +[ext_resource type="Theme" uid="uid://bhw3jbbrt3m1k" path="res://logic-scenes/chat_view/theme-smartphone.tres" id="1_6hmi7"] +[ext_resource type="Texture2D" uid="uid://b3guc2v1fj04p" path="res://logic-scenes/chat_view/phone-background.png" id="1_vvup7"] +[ext_resource type="LabelSettings" uid="uid://dy1l6fcsy54od" path="res://logic-scenes/chat_view/labe-top-bar.tres" id="2_xckgu"] +[ext_resource type="Resource" uid="uid://cc6q101fbtq0" path="res://logic-scenes/chat_view/conversation-brother.tres" id="3_5qtt2"] +[ext_resource type="Texture2D" uid="uid://dhecdhucnu7sq" path="res://logic-scenes/chat_view/phone-notifications.png" id="3_myhe7"] +[ext_resource type="StyleBox" uid="uid://coqfwa80t22m0" path="res://logic-scenes/chat_view/style-chat-system-shade.tres" id="3_qbcw0"] +[ext_resource type="Script" uid="uid://db7t2kqbsskoq" path="res://logic-scenes/chat_view/chat-view.gd" id="4_myhe7"] +[ext_resource type="Texture2D" uid="uid://cv58eu35ra1ku" path="res://logic-scenes/chat_view/phone-dot.png" id="4_vvup7"] +[ext_resource type="Texture2D" uid="uid://bng2qbusdg7dj" path="res://logic-scenes/chat_view/phone-signal.png" id="4_xckgu"] +[ext_resource type="Texture2D" uid="uid://dw5d2ffpq8w3r" path="res://logic-scenes/chat_view/avatar-other-large.png" id="5_5qtt2"] +[ext_resource type="LabelSettings" uid="uid://mh8uu4rlqmv5" path="res://logic-scenes/chat_view/label-timestamp.tres" id="5_qgt32"] +[ext_resource type="PackedScene" uid="uid://dc58hnxdn0l2o" path="res://logic-scenes/chat_view/message_other.tscn" id="8_wih1b"] +[ext_resource type="PackedScene" uid="uid://cjodbrwc01gwi" path="res://logic-scenes/chat_view/message_self.tscn" id="13_qw8qg"] + +[sub_resource type="Gradient" id="Gradient_qgt32"] +colors = PackedColorArray(0, 0, 0, 0.5019608, 1, 1, 1, 0) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_5qtt2"] +gradient = SubResource("Gradient_qgt32") +fill_from = Vector2(0, 0.5) +fill_to = Vector2(0, 1) + +[node name="PhoneScreen" type="TextureRect" unique_id=422469732] +custom_minimum_size = Vector2(400, 640) +anchors_preset = -1 +anchor_right = 0.41666666 +anchor_bottom = 1.1851852 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture = ExtResource("1_vvup7") +script = ExtResource("4_myhe7") +conversation = ExtResource("3_5qtt2") +metadata/_edit_use_anchors_ = true + +[node name="ForegroundApp" type="MarginContainer" parent="." unique_id=1253480453] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 4 +theme_override_constants/margin_right = 4 +theme_override_constants/margin_bottom = 0 + +[node name="AppLayout" type="VBoxContainer" parent="ForegroundApp" unique_id=1207866359] +layout_mode = 2 +theme = ExtResource("1_6hmi7") + +[node name="ChatContainer" type="ScrollContainer" parent="ForegroundApp/AppLayout" unique_id=124411261] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 +horizontal_scroll_mode = 0 +vertical_scroll_mode = 2 + +[node name="ChatHistory" type="VBoxContainer" parent="ForegroundApp/AppLayout/ChatContainer" unique_id=1303301180] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="ChatHeader" type="TextureRect" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory" unique_id=706531178] +custom_minimum_size = Vector2(0, 320) +layout_mode = 2 +texture = SubResource("GradientTexture2D_5qtt2") + +[node name="VBoxContainer" type="VBoxContainer" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory/ChatHeader" unique_id=2070178907] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Spacer" type="Control" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory/ChatHeader/VBoxContainer" unique_id=52070824] +custom_minimum_size = Vector2(0, 64) +layout_mode = 2 + +[node name="ContactAvatar" type="TextureRect" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory/ChatHeader/VBoxContainer" unique_id=1516679922] +layout_mode = 2 +texture = ExtResource("5_5qtt2") +stretch_mode = 3 + +[node name="ContactText" type="Label" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory/ChatHeader/VBoxContainer" unique_id=21415362] +layout_mode = 2 +text = " ++49 123456789 +Member of 👯Geschwister" +label_settings = ExtResource("5_qgt32") +horizontal_alignment = 1 +vertical_alignment = 2 + +[node name="BoundaryText" type="Label" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory/ChatHeader/VBoxContainer" unique_id=1935901886] +layout_mode = 2 +text = "This is the beginning of your chat history with on this device. +" +label_settings = ExtResource("5_qgt32") +horizontal_alignment = 1 +vertical_alignment = 2 + +[node name="Message-Other" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory" unique_id=102479796 instance=ExtResource("8_wih1b")] +layout_mode = 2 +script = null + +[node name="Message-Self" parent="ForegroundApp/AppLayout/ChatContainer/ChatHistory" unique_id=806983375 instance=ExtResource("13_qw8qg")] +layout_mode = 2 +script = null + +[node name="TopBarShade" type="PanelContainer" parent="." unique_id=18123572] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 32.0 +grow_horizontal = 2 +size_flags_vertical = 0 +theme_override_styles/panel = ExtResource("3_qbcw0") + +[node name="TopBar" type="HBoxContainer" parent="TopBarShade" unique_id=715115340] +layout_mode = 2 +alignment = 1 + +[node name="Time" type="Label" parent="TopBarShade/TopBar" unique_id=538973152] +layout_mode = 2 +text = "08:12 PM" +label_settings = ExtResource("2_xckgu") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Notifcations" type="TextureRect" parent="TopBarShade/TopBar" unique_id=164400921] +layout_mode = 2 +texture = ExtResource("3_myhe7") + +[node name="Dot1" type="TextureRect" parent="TopBarShade/TopBar" unique_id=1306078406] +layout_mode = 2 +texture = ExtResource("4_vvup7") + +[node name="Dot2" type="TextureRect" parent="TopBarShade/TopBar" unique_id=256206201] +layout_mode = 2 +texture = ExtResource("4_vvup7") + +[node name="Control2" type="Control" parent="TopBarShade/TopBar" unique_id=209916177] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="SignalStrength" type="TextureRect" parent="TopBarShade/TopBar" unique_id=416104296] +layout_mode = 2 +texture = ExtResource("4_xckgu") + +[node name="Carrier" type="Label" parent="TopBarShade/TopBar" unique_id=61022698] +layout_mode = 2 +text = "HRT-Mobile" +label_settings = ExtResource("2_xckgu") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="NavBarShade" type="PanelContainer" parent="." unique_id=555699836] +layout_mode = 1 +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -32.0 +grow_horizontal = 2 +grow_vertical = 0 +size_flags_vertical = 0 +theme_override_styles/panel = ExtResource("3_qbcw0") + +[node name="NavBar" type="HBoxContainer" parent="NavBarShade" unique_id=2104485739] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 8 +alignment = 1 + +[node name="Dot1" type="TextureRect" parent="NavBarShade/NavBar" unique_id=839179932] +layout_mode = 2 +texture = ExtResource("4_vvup7") + +[node name="Dot2" type="TextureRect" parent="NavBarShade/NavBar" unique_id=993692065] +layout_mode = 2 +texture = ExtResource("4_vvup7") diff --git a/src/logic-scenes/chat_view/chat_bubble.gd b/src/logic-scenes/chat_view/chat_bubble.gd new file mode 100644 index 00000000..2c92256b --- /dev/null +++ b/src/logic-scenes/chat_view/chat_bubble.gd @@ -0,0 +1,35 @@ +## chat_bubble.gd — attach to your bubble container (e.g. PanelContainer) +@tool +class_name ChatBubble +extends Container + +@export var min_bubble_width: float = 64.0 +@export var max_bubble_width: float = 512.0 + +@onready var label: RichTextLabel = %RichTextLabel +@onready var timestamp: Label = %TimeStamp + +var _text := "" + +func _ready(): + label.resized.connect(_on_label_resized) + label.theme_changed.connect(_on_label_resized) + label.fit_content = true + +func _process(_delta: float) -> void: + if (label.text != _text): + set_text(label.text, timestamp.text) + +func set_text(new_text: String, new_time: String) -> void: + _text = new_text + label.autowrap_mode = TextServer.AUTOWRAP_OFF + label.custom_minimum_size.x = min_bubble_width + label.text = _text # triggers layout → NOTIFICATION_RESIZED + timestamp.text = new_time + +func _on_label_resized() -> void: + if label.get_content_width() > max_bubble_width: + label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART + label.custom_minimum_size.x = max_bubble_width + else: + pass # already correctly sized diff --git a/src/logic-scenes/chat_view/chat_bubble.gd.uid b/src/logic-scenes/chat_view/chat_bubble.gd.uid new file mode 100644 index 00000000..7436c79e --- /dev/null +++ b/src/logic-scenes/chat_view/chat_bubble.gd.uid @@ -0,0 +1 @@ +uid://dlbwvie007wfx diff --git a/src/logic-scenes/chat_view/conversation-brother.tres b/src/logic-scenes/chat_view/conversation-brother.tres new file mode 100644 index 00000000..ee56f2ea --- /dev/null +++ b/src/logic-scenes/chat_view/conversation-brother.tres @@ -0,0 +1,28 @@ +[gd_resource type="Resource" script_class="ChatConversation" format=3 uid="uid://cc6q101fbtq0"] + +[ext_resource type="Script" uid="uid://be16bo6mf4kqu" path="res://logic-scenes/chat_view/chat-message.gd" id="1_lpye3"] +[ext_resource type="Script" uid="uid://c8hqd1leg4dfy" path="res://logic-scenes/chat_view/chat-conversation.gd" id="2_kg6cg"] + +[sub_resource type="Resource" id="Resource_iwd5k"] +script = ExtResource("1_lpye3") +text = "Sorry" +time_string = "This is smol." +metadata/_custom_type_script = "uid://be16bo6mf4kqu" + +[sub_resource type="Resource" id="Resource_1hd2w"] +script = ExtResource("1_lpye3") +text = "I never knew what to say. Can I write instead? " +time_string = "8:12 PM" +metadata/_custom_type_script = "uid://be16bo6mf4kqu" + +[sub_resource type="Resource" id="Resource_w8y7q"] +script = ExtResource("1_lpye3") +text = "🙄" +time_string = "7:59 PM" +is_own_message = true +metadata/_custom_type_script = "uid://be16bo6mf4kqu" + +[resource] +script = ExtResource("2_kg6cg") +messages = Array[ExtResource("1_lpye3")]([SubResource("Resource_iwd5k"), SubResource("Resource_1hd2w"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q"), SubResource("Resource_w8y7q")]) +metadata/_custom_type_script = "uid://c8hqd1leg4dfy" diff --git a/src/logic-scenes/chat_view/labe-top-bar.tres b/src/logic-scenes/chat_view/labe-top-bar.tres new file mode 100644 index 00000000..eab7bf5d --- /dev/null +++ b/src/logic-scenes/chat_view/labe-top-bar.tres @@ -0,0 +1,8 @@ +[gd_resource type="LabelSettings" format=3 uid="uid://dy1l6fcsy54od"] + +[ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="1_tvq1w"] + +[resource] +font = ExtResource("1_tvq1w") +font_size = 18 +shadow_size = 0 diff --git a/src/logic-scenes/chat_view/label-timestamp.tres b/src/logic-scenes/chat_view/label-timestamp.tres new file mode 100644 index 00000000..d8ae0266 --- /dev/null +++ b/src/logic-scenes/chat_view/label-timestamp.tres @@ -0,0 +1,8 @@ +[gd_resource type="LabelSettings" format=3 uid="uid://mh8uu4rlqmv5"] + +[ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="1_f4p0e"] + +[resource] +font = ExtResource("1_f4p0e") +font_color = Color(0, 0, 0, 0.8627451) +shadow_size = 0 diff --git a/src/logic-scenes/chat_view/message_other.tscn b/src/logic-scenes/chat_view/message_other.tscn new file mode 100644 index 00000000..e1bc2e73 --- /dev/null +++ b/src/logic-scenes/chat_view/message_other.tscn @@ -0,0 +1,66 @@ +[gd_scene format=3 uid="uid://dc58hnxdn0l2o"] + +[ext_resource type="Theme" uid="uid://bhw3jbbrt3m1k" path="res://logic-scenes/chat_view/theme-smartphone.tres" id="1_0pomh"] +[ext_resource type="Texture2D" uid="uid://dekaqj10p8rqk" path="res://logic-scenes/chat_view/avatar-self.png" id="1_r4gcv"] +[ext_resource type="StyleBox" uid="uid://dj1fuvcy0sw7k" path="res://logic-scenes/chat_view/style-chat-bubble.tres" id="2_0pomh"] +[ext_resource type="Script" uid="uid://dlbwvie007wfx" path="res://logic-scenes/chat_view/chat_bubble.gd" id="3_3g7sa"] +[ext_resource type="LabelSettings" uid="uid://mh8uu4rlqmv5" path="res://logic-scenes/chat_view/label-timestamp.tres" id="4_yjo27"] + +[node name="Message-Other" type="HBoxContainer" unique_id=102479796] +size_flags_horizontal = 3 +theme = ExtResource("1_0pomh") +alignment = 2 +script = ExtResource("3_3g7sa") + +[node name="Avatar" type="TextureRect" parent="." unique_id=1077043040] +layout_mode = 2 +size_flags_vertical = 8 +texture = ExtResource("1_r4gcv") +stretch_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1636732531] +layout_mode = 2 +size_flags_horizontal = 2 +size_flags_vertical = 9 + +[node name="Bubble" type="PanelContainer" parent="VBoxContainer" unique_id=793380316] +custom_minimum_size = Vector2(0, 52) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 3 +theme_override_styles/panel = ExtResource("2_0pomh") + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/Bubble" unique_id=1163778954] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_constants/margin_left = 0 +theme_override_constants/margin_top = 4 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 4 + +[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/Bubble/MarginContainer" unique_id=418400525] +unique_name_in_owner = true +custom_minimum_size = Vector2(64, 64) +layout_mode = 2 +size_flags_horizontal = 3 +theme_type_variation = &"message-other" +bbcode_enabled = true +text = "It is a long established fact" +fit_content = true +scroll_active = false +autowrap_mode = 0 +vertical_alignment = 1 +justification_flags = 99 +metadata/_custom_type_script = "uid://dlbwvie007wfx" + +[node name="TimeStamp" type="Label" parent="VBoxContainer" unique_id=1723936773] +unique_name_in_owner = true +layout_mode = 2 +text = "8:12 PM" +label_settings = ExtResource("4_yjo27") +horizontal_alignment = 2 + +[node name="Spacer" type="Control" parent="." unique_id=1047768334] +custom_minimum_size = Vector2(160, 0) +layout_mode = 2 diff --git a/src/logic-scenes/chat_view/message_self.tscn b/src/logic-scenes/chat_view/message_self.tscn new file mode 100644 index 00000000..fd0051d9 --- /dev/null +++ b/src/logic-scenes/chat_view/message_self.tscn @@ -0,0 +1,65 @@ +[gd_scene format=3 uid="uid://cjodbrwc01gwi"] + +[ext_resource type="Theme" uid="uid://bhw3jbbrt3m1k" path="res://logic-scenes/chat_view/theme-smartphone.tres" id="1_aitur"] +[ext_resource type="StyleBox" uid="uid://dd4xc216ul21m" path="res://logic-scenes/chat_view/style-chat-bubble-self.tres" id="1_ufk1a"] +[ext_resource type="Script" uid="uid://dlbwvie007wfx" path="res://logic-scenes/chat_view/chat_bubble.gd" id="2_aitur"] +[ext_resource type="LabelSettings" uid="uid://mh8uu4rlqmv5" path="res://logic-scenes/chat_view/label-timestamp.tres" id="3_hmjif"] +[ext_resource type="Texture2D" uid="uid://dekaqj10p8rqk" path="res://logic-scenes/chat_view/avatar-self.png" id="4_q2b2g"] + +[node name="Message-Self" type="HBoxContainer" unique_id=806983375] +size_flags_horizontal = 3 +theme = ExtResource("1_aitur") +alignment = 2 +script = ExtResource("2_aitur") + +[node name="Spacer" type="Control" parent="." unique_id=929861663] +custom_minimum_size = Vector2(160, 0) +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=361845079] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 9 + +[node name="Bubble" type="PanelContainer" parent="VBoxContainer" unique_id=930440916] +custom_minimum_size = Vector2(0, 52) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 3 +theme_override_styles/panel = ExtResource("1_ufk1a") + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/Bubble" unique_id=2011015357] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_constants/margin_left = 4 +theme_override_constants/margin_top = 4 +theme_override_constants/margin_right = 0 +theme_override_constants/margin_bottom = 4 + +[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/Bubble/MarginContainer" unique_id=342773493] +unique_name_in_owner = true +custom_minimum_size = Vector2(512, 64) +layout_mode = 2 +size_flags_horizontal = 3 +theme_type_variation = &"message-other" +bbcode_enabled = true +text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s." +fit_content = true +scroll_active = false +vertical_alignment = 1 +justification_flags = 99 +metadata/_custom_type_script = "uid://dlbwvie007wfx" + +[node name="TimeStamp" type="Label" parent="VBoxContainer" unique_id=1916601114] +unique_name_in_owner = true +layout_mode = 2 +text = "8:12 PM" +label_settings = ExtResource("3_hmjif") +horizontal_alignment = 2 + +[node name="Avatar" type="TextureRect" parent="." unique_id=502320005] +layout_mode = 2 +size_flags_vertical = 8 +texture = ExtResource("4_q2b2g") +stretch_mode = 2 diff --git a/src/logic-scenes/chat_view/phone-background.png b/src/logic-scenes/chat_view/phone-background.png new file mode 100644 index 00000000..c95b8332 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-background.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:346db3556c74f26e90e67119a42474fd6f119a42c4b249a924d7972b77039834 +size 452469 diff --git a/src/logic-scenes/chat_view/phone-background.png.import b/src/logic-scenes/chat_view/phone-background.png.import new file mode 100644 index 00000000..dd74af16 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-background.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3guc2v1fj04p" +path="res://.godot/imported/phone-background.png-a0d3235eeec56f234efbacce8d08f024.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/phone-background.png" +dest_files=["res://.godot/imported/phone-background.png-a0d3235eeec56f234efbacce8d08f024.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/phone-dot.png b/src/logic-scenes/chat_view/phone-dot.png new file mode 100644 index 00000000..a170edd9 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-dot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed4184fdfc36379b98c29ecf5002edaafb11d0cb1bb010289dd67c66d2b878c1 +size 603 diff --git a/src/logic-scenes/chat_view/phone-dot.png.import b/src/logic-scenes/chat_view/phone-dot.png.import new file mode 100644 index 00000000..6b893394 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-dot.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cv58eu35ra1ku" +path="res://.godot/imported/phone-dot.png-2758efc6f7ccb6f5a32a65b4f7cfdc54.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/phone-dot.png" +dest_files=["res://.godot/imported/phone-dot.png-2758efc6f7ccb6f5a32a65b4f7cfdc54.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/phone-notifications.png b/src/logic-scenes/chat_view/phone-notifications.png new file mode 100644 index 00000000..6e874c48 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-notifications.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6daa410475890fd67ce6f27efa54d0838f231f9d8bc4617a066c9b3b30f40ad +size 1179 diff --git a/src/logic-scenes/chat_view/phone-notifications.png.import b/src/logic-scenes/chat_view/phone-notifications.png.import new file mode 100644 index 00000000..bb5808e6 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-notifications.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dhecdhucnu7sq" +path="res://.godot/imported/phone-notifications.png-2e4c4652e368365f11a8fcd5429d7863.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/phone-notifications.png" +dest_files=["res://.godot/imported/phone-notifications.png-2e4c4652e368365f11a8fcd5429d7863.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/phone-signal.png b/src/logic-scenes/chat_view/phone-signal.png new file mode 100644 index 00000000..4c354708 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-signal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10214fb08702af06f61c96929f4bdbae29deb7967d154bce9d5071b7960a98e0 +size 415 diff --git a/src/logic-scenes/chat_view/phone-signal.png.import b/src/logic-scenes/chat_view/phone-signal.png.import new file mode 100644 index 00000000..ff4f7247 --- /dev/null +++ b/src/logic-scenes/chat_view/phone-signal.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bng2qbusdg7dj" +path="res://.godot/imported/phone-signal.png-dd1931ca7afeae37c8c6215bd5a99a82.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://logic-scenes/chat_view/phone-signal.png" +dest_files=["res://.godot/imported/phone-signal.png-dd1931ca7afeae37c8c6215bd5a99a82.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/logic-scenes/chat_view/style-chat-bubble-self.tres b/src/logic-scenes/chat_view/style-chat-bubble-self.tres new file mode 100644 index 00000000..d6f43cf2 --- /dev/null +++ b/src/logic-scenes/chat_view/style-chat-bubble-self.tres @@ -0,0 +1,15 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://dd4xc216ul21m"] + +[resource] +bg_color = Color(0.21568628, 0.49019608, 0.7607843, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(1, 1, 1, 0.5019608) +border_blend = true +corner_radius_top_left = 24 +corner_radius_top_right = 24 +corner_radius_bottom_left = 24 +shadow_size = 5 +shadow_offset = Vector2(5, 8) diff --git a/src/logic-scenes/chat_view/style-chat-bubble.tres b/src/logic-scenes/chat_view/style-chat-bubble.tres new file mode 100644 index 00000000..bb655345 --- /dev/null +++ b/src/logic-scenes/chat_view/style-chat-bubble.tres @@ -0,0 +1,15 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://dj1fuvcy0sw7k"] + +[resource] +bg_color = Color(0, 0.5529412, 0.5137255, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(1, 1, 1, 0.5019608) +border_blend = true +corner_radius_top_left = 24 +corner_radius_top_right = 24 +corner_radius_bottom_right = 24 +shadow_size = 5 +shadow_offset = Vector2(5, 8) diff --git a/src/logic-scenes/chat_view/style-chat-system-shade.tres b/src/logic-scenes/chat_view/style-chat-system-shade.tres new file mode 100644 index 00000000..393f3a8b --- /dev/null +++ b/src/logic-scenes/chat_view/style-chat-system-shade.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://coqfwa80t22m0"] + +[resource] +bg_color = Color(0, 0, 0, 0.627451) diff --git a/src/logic-scenes/chat_view/theme-smartphone.tres b/src/logic-scenes/chat_view/theme-smartphone.tres new file mode 100644 index 00000000..10b9d4ec --- /dev/null +++ b/src/logic-scenes/chat_view/theme-smartphone.tres @@ -0,0 +1,8 @@ +[gd_resource type="Theme" format=3 uid="uid://bhw3jbbrt3m1k"] + +[ext_resource type="FontFile" uid="uid://b0i5ipn75noh6" path="res://import/fonts/Ubuntu-R.ttf" id="1_o4frn"] + +[resource] +default_font = ExtResource("1_o4frn") +default_font_size = 24 +VBoxContainer/constants/separation = 9