diff --git a/Root.tscn b/Root.tscn index fcc092c..9c63086 100644 --- a/Root.tscn +++ b/Root.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=14 format=3 uid="uid://4whij2hmts0t"] +[gd_scene load_steps=16 format=3 uid="uid://4whij2hmts0t"] [ext_resource type="Script" path="res://Player.gd" id="1_wt4gx"] [ext_resource type="Material" uid="uid://dondfiavgo2ws" path="res://Unshaded.material" id="2_upp15"] [ext_resource type="FontFile" uid="uid://cseshyj4yw2f5" path="res://fonts/FiraSans-Medium.ttf" id="3_p3wyc"] [ext_resource type="Script" path="res://GameTimer.gd" id="3_y362g"] +[ext_resource type="Script" path="res://TextBox.gd" id="4_gpkq6"] +[ext_resource type="FontFile" uid="uid://qf3uxmta6lpw" path="res://fonts/FiraCode-Medium.ttf" id="5_yvnu2"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_castg"] @@ -91,6 +93,7 @@ theme_override_constants/margin_left = 128 theme_override_constants/margin_top = 16 theme_override_constants/margin_right = 128 theme_override_constants/margin_bottom = 16 +script = ExtResource("4_gpkq6") [node name="Panel" type="Panel" parent="UI/TextBox"] layout_mode = 2 @@ -116,6 +119,10 @@ theme_override_font_sizes/normal_font_size = 32 bbcode_enabled = true text = "[center]garasauto[/center]" +[node name="Timer" type="Timer" parent="UI/TextBox"] +wait_time = 5.0 +one_shot = true + [node name="TimerBox" type="MarginContainer" parent="UI"] layout_mode = 1 anchors_preset = 1 @@ -131,8 +138,12 @@ theme_override_constants/margin_bottom = 16 [node name="Label" type="Label" parent="UI/TimerBox"] layout_mode = 2 +theme_override_fonts/font = ExtResource("5_yvnu2") +theme_override_font_sizes/font_size = 32 text = "Garasauto" horizontal_alignment = 2 [node name="GameTimer" type="Node" parent="UI/TimerBox/Label"] script = ExtResource("3_y362g") + +[connection signal="timeout" from="UI/TextBox/Timer" to="UI/TextBox" method="_on_timer_timeout"] diff --git a/TextBox.gd b/TextBox.gd new file mode 100644 index 0000000..3e86d2e --- /dev/null +++ b/TextBox.gd @@ -0,0 +1,11 @@ +extends MarginContainer + + +func display(s: String, t: float): + $Panel/HBoxContainer/RichTextLabel.show() + $Panel/HBoxContainer/RichTextLabel.text = s + $Timer.start(t) + + +func _on_timer_timeout(): + $Panel/HBoxContainer/RichTextLabel.hide() diff --git a/fonts/FiraCode-Medium.ttf b/fonts/FiraCode-Medium.ttf new file mode 100644 index 0000000..7a9c38e Binary files /dev/null and b/fonts/FiraCode-Medium.ttf differ diff --git a/fonts/FiraCode-Medium.ttf.import b/fonts/FiraCode-Medium.ttf.import new file mode 100644 index 0000000..c2587fa --- /dev/null +++ b/fonts/FiraCode-Medium.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://qf3uxmta6lpw" +path="res://.godot/imported/FiraCode-Medium.ttf-48539f11d847d70386298a1cbb21aa77.fontdata" + +[deps] + +source_file="res://fonts/FiraCode-Medium.ttf" +dest_files=["res://.godot/imported/FiraCode-Medium.ttf-48539f11d847d70386298a1cbb21aa77.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={}