diff --git a/src/import/fonts/Ubuntu-M.ttf b/src/import/fonts/Ubuntu-M.ttf new file mode 100644 index 0000000..ca9c03a Binary files /dev/null and b/src/import/fonts/Ubuntu-M.ttf differ diff --git a/src/import/fonts/Ubuntu-M.ttf.import b/src/import/fonts/Ubuntu-M.ttf.import new file mode 100644 index 0000000..8a39d01 --- /dev/null +++ b/src/import/fonts/Ubuntu-M.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dtkwj2lnmnery" +path="res://.godot/imported/Ubuntu-M.ttf-cd3ad11838c8564f9d7d4ba946f5eed5.fontdata" + +[deps] + +source_file="res://import/fonts/Ubuntu-M.ttf" +dest_files=["res://.godot/imported/Ubuntu-M.ttf-cd3ad11838c8564f9d7d4ba946f5eed5.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/src/import/fonts/Ubuntu-R.ttf b/src/import/fonts/Ubuntu-R.ttf new file mode 100644 index 0000000..d748728 Binary files /dev/null and b/src/import/fonts/Ubuntu-R.ttf differ diff --git a/src/import/fonts/Ubuntu-R.ttf.import b/src/import/fonts/Ubuntu-R.ttf.import new file mode 100644 index 0000000..b59342d --- /dev/null +++ b/src/import/fonts/Ubuntu-R.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://b0i5ipn75noh6" +path="res://.godot/imported/Ubuntu-R.ttf-fa39f076613c2140c9c9a29528ef9154.fontdata" + +[deps] + +source_file="res://import/fonts/Ubuntu-R.ttf" +dest_files=["res://.godot/imported/Ubuntu-R.ttf-fa39f076613c2140c9c9a29528ef9154.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/src/import/fonts/Ubuntu-RI.ttf b/src/import/fonts/Ubuntu-RI.ttf new file mode 100644 index 0000000..4f2d2bc Binary files /dev/null and b/src/import/fonts/Ubuntu-RI.ttf differ diff --git a/src/import/fonts/Ubuntu-RI.ttf.import b/src/import/fonts/Ubuntu-RI.ttf.import new file mode 100644 index 0000000..482615c --- /dev/null +++ b/src/import/fonts/Ubuntu-RI.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bmh8v44f6txfo" +path="res://.godot/imported/Ubuntu-RI.ttf-86be849ad6185f9592b2a1910ceaa13a.fontdata" + +[deps] + +source_file="res://import/fonts/Ubuntu-RI.ttf" +dest_files=["res://.godot/imported/Ubuntu-RI.ttf-86be849ad6185f9592b2a1910ceaa13a.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/src/import/fonts/UbuntuMono-BI.ttf b/src/import/fonts/UbuntuMono-BI.ttf new file mode 100644 index 0000000..6c5b8ba Binary files /dev/null and b/src/import/fonts/UbuntuMono-BI.ttf differ diff --git a/src/import/fonts/UbuntuMono-BI.ttf.import b/src/import/fonts/UbuntuMono-BI.ttf.import new file mode 100644 index 0000000..6a5ba41 --- /dev/null +++ b/src/import/fonts/UbuntuMono-BI.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://c1mhji6nbi1bj" +path="res://.godot/imported/UbuntuMono-BI.ttf-8bcee148e1ac050fbb33f4cfee51bb0a.fontdata" + +[deps] + +source_file="res://import/fonts/UbuntuMono-BI.ttf" +dest_files=["res://.godot/imported/UbuntuMono-BI.ttf-8bcee148e1ac050fbb33f4cfee51bb0a.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} 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 0000000..ae57a8f --- /dev/null +++ b/src/logic-scenes/chat_view/chat-bubble.gd @@ -0,0 +1,6 @@ +@tool +class_name ChatMessage extends Resource + +@export_multiline var text: String = "" +@export var time_string = "" +@export var is_own_message: bool = false 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 0000000..a7ede66 --- /dev/null +++ b/src/logic-scenes/chat_view/chat-bubble.gd.uid @@ -0,0 +1 @@ +uid://be16bo6mf4kqu diff --git a/src/logic-scenes/chat_view/chat-view-protoyping.tscn b/src/logic-scenes/chat_view/chat-view-protoyping.tscn new file mode 100644 index 0000000..d6b491f --- /dev/null +++ b/src/logic-scenes/chat_view/chat-view-protoyping.tscn @@ -0,0 +1,121 @@ +[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 +script = ExtResource("4_n65mw") +messages = Array[ExtResource("5_1hd2w")]([SubResource("Resource_iwd5k"), SubResource("Resource_1hd2w"), SubResource("Resource_w8y7q")]) + +[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="RichTextLabel2" type="RichTextLabel" parent="ScrollContainer/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +theme = SubResource("Theme_w8y7q") +bbcode_enabled = true +text = "Dies ist eine Telegram-Message +[i]8:12 PM[/i]" +fit_content = true +scroll_active = false +autowrap_mode = 0 + +[node name="RichTextLabel3" type="RichTextLabel" parent="ScrollContainer/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="ScrollContainer/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="ScrollContainer/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="ScrollContainer/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="ScrollContainer/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 new file mode 100644 index 0000000..1fa7ffb --- /dev/null +++ b/src/logic-scenes/chat_view/chat-view.gd @@ -0,0 +1,4 @@ +@tool +class_name ChatView extends ScrollContainer + +@export var messages: Array[ChatMessage] diff --git a/src/logic-scenes/chat_view/chat-view.gd.uid b/src/logic-scenes/chat_view/chat-view.gd.uid new file mode 100644 index 0000000..505e539 --- /dev/null +++ b/src/logic-scenes/chat_view/chat-view.gd.uid @@ -0,0 +1 @@ +uid://db7t2kqbsskoq