Added UI focus tracking

This commit is contained in:
2024-02-25 19:47:13 +01:00
parent dc252ab5d3
commit 44fd041c60
10 changed files with 79 additions and 28 deletions

View File

@ -19,6 +19,16 @@
[node name="UI" type="CanvasLayer"]
script = ExtResource("1_l5b6o")
[node name="Unfocus" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 1
mouse_filter = 1
[node name="TopLeft" type="MarginContainer" parent="."]
offset_right = 40.0
offset_bottom = 50.0
@ -113,7 +123,7 @@ grow_horizontal = 2
grow_vertical = 0
[node name="Chat" type="VBoxContainer" parent="Bottom"]
custom_minimum_size = Vector2(200, 0)
custom_minimum_size = Vector2(320, 180)
layout_mode = 2
size_flags_vertical = 3
alignment = 2
@ -121,8 +131,12 @@ alignment = 2
[node name="ChatBox" type="RichTextLabel" parent="Bottom/Chat"]
layout_mode = 2
size_flags_vertical = 3
focus_mode = 2
bbcode_enabled = true
scroll_active = false
scroll_following = true
context_menu_enabled = true
selection_enabled = true
script = ExtResource("5_43juw")
[node name="ChatInput" type="LineEdit" parent="Bottom/Chat"]
@ -224,7 +238,3 @@ anchor_left = 0.25
anchor_top = 0.25
anchor_right = 0.75
anchor_bottom = 0.75
[connection signal="focus_entered" from="Bottom/Chat/ChatInput" to="Bottom/Chat/ChatInput" method="_on_focus_entered"]
[connection signal="focus_exited" from="Bottom/Chat/ChatInput" to="Bottom/Chat/ChatInput" method="_on_focus_exited"]
[connection signal="text_submitted" from="Bottom/Chat/ChatInput" to="Bottom/Chat/ChatInput" method="_on_text_submitted"]