wip: adding chat bubbles
This commit is contained in:
parent
1a814b157a
commit
ff3ada68b8
Binary file not shown.
|
|
@ -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={}
|
||||
Binary file not shown.
|
|
@ -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={}
|
||||
Binary file not shown.
|
|
@ -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={}
|
||||
Binary file not shown.
|
|
@ -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={}
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://be16bo6mf4kqu
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@tool
|
||||
class_name ChatView extends ScrollContainer
|
||||
|
||||
@export var messages: Array[ChatMessage]
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://db7t2kqbsskoq
|
||||
Loading…
Reference in New Issue