Improvev dialog box font size and shrink nameplate background to content

This commit is contained in:
Alice Gaudon 2020-08-16 11:52:59 +02:00
parent d7c98374ba
commit 6a5e46b2b3
3 changed files with 23 additions and 18 deletions

View File

@ -4,4 +4,5 @@
[resource]
outline_color = Color( 0, 0, 0, 1 )
extra_spacing_bottom = -6
font_data = ExtResource( 1 )

View File

@ -99,10 +99,10 @@ __meta__ = {
}
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
margin_top = 61.0
margin_right = 184.0
margin_bottom = 74.0
size_flags_horizontal = 3
margin_top = 50.0
margin_right = 22.0
margin_bottom = 83.0
size_flags_horizontal = 0
size_flags_stretch_ratio = 0.2
custom_constants/margin_right = 4
custom_constants/margin_left = 4
@ -114,8 +114,8 @@ __meta__ = {
show_behind_parent = true
material = SubResource( 5 )
margin_left = 4.0
margin_right = 180.0
margin_bottom = 13.0
margin_right = 18.0
margin_bottom = 33.0
texture = ExtResource( 1 )
patch_margin_left = 1
patch_margin_top = 1
@ -127,19 +127,21 @@ __meta__ = {
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/MarginContainer"]
margin_left = 4.0
margin_right = 180.0
margin_bottom = 13.0
margin_right = 18.0
margin_bottom = 33.0
size_flags_horizontal = 0
custom_constants/margin_right = 4
custom_constants/margin_left = 4
custom_constants/margin_bottom = -2
[node name="CharacterName" type="RichTextLabel" parent="MarginContainer/VBoxContainer/MarginContainer/MarginContainer"]
margin_left = 4.0
margin_right = 176.0
margin_bottom = 15.0
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
margin_right = 10.0
margin_bottom = 33.0
rect_min_size = Vector2( 6, 0 )
rect_clip_content = false
size_flags_horizontal = 0
custom_fonts/normal_font = ExtResource( 2 )
text = "Elie"
text = "Ely"
fit_content_height = true
scroll_active = false
__meta__ = {
@ -147,7 +149,8 @@ __meta__ = {
}
[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
margin_top = 74.0
show_behind_parent = true
margin_top = 83.0
margin_right = 184.0
margin_bottom = 108.0
__meta__ = {
@ -158,7 +161,7 @@ __meta__ = {
show_behind_parent = true
material = SubResource( 5 )
margin_right = 184.0
margin_bottom = 34.0
margin_bottom = 25.0
texture = ExtResource( 1 )
patch_margin_left = 10
patch_margin_top = 10
@ -170,7 +173,7 @@ __meta__ = {
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/MarginContainer2"]
margin_right = 184.0
margin_bottom = 34.0
margin_bottom = 25.0
custom_constants/margin_right = 6
custom_constants/margin_top = 2
custom_constants/margin_left = 6
@ -183,7 +186,7 @@ __meta__ = {
margin_left = 6.0
margin_top = 2.0
margin_right = 178.0
margin_bottom = 32.0
margin_bottom = 23.0
rect_clip_content = false
size_flags_horizontal = 3
custom_fonts/normal_font = ExtResource( 2 )

View File

@ -42,6 +42,7 @@ func next() -> void:
func _update() -> void:
title.text = _dialogue[_index].name
title.rect_min_size.x = title.get_font('normal_font').get_string_size(title.text).x
text.text = _dialogue[_index].text
#expression = _dialogue[_index].expression