File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
scenes/game_elements/props/fixed_size_label Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -58,3 +58,10 @@ func _exit_tree() -> void:
58
58
59
59
if label_container :
60
60
label_container .queue_free ()
61
+
62
+
63
+ func _on_label_resized () -> void :
64
+ if not is_node_ready ():
65
+ return
66
+ # TODO: Workaround for https://github.com/godotengine/godot/issues/100626
67
+ label_container .reset_size ()
Original file line number Diff line number Diff line change @@ -14,20 +14,21 @@ label_text = "Talk"
14
14
[node name ="LabelContainer" type ="PanelContainer" parent ="." ]
15
15
unique_name_in_owner = true
16
16
texture_filter = 2
17
- layout_mode = 2
18
- offset_left = -50.0
19
- offset_top = -32.5
20
- offset_right = 50.0
21
- offset_bottom = 32.5
22
- grow_horizontal = 2
23
- grow_vertical = 2
17
+ custom_minimum_size = Vector2 (68 , 46 )
18
+ layout_mode = 0
19
+ offset_left = -34.0
20
+ offset_top = -23.0
21
+ offset_right = 34.0
22
+ offset_bottom = 23.0
24
23
size_flags_horizontal = 4
25
24
size_flags_vertical = 4
26
25
theme = ExtResource ("1_ah0mj" )
27
26
theme_type_variation = &"FixedSizeLabelContainer"
28
27
29
28
[node name ="MarginContainer" type ="MarginContainer" parent ="LabelContainer" ]
30
29
layout_mode = 2
30
+ size_flags_horizontal = 4
31
+ size_flags_vertical = 4
31
32
theme_override_constants/margin_left = 10
32
33
theme_override_constants/margin_top = 5
33
34
theme_override_constants/margin_right = 10
@@ -36,8 +37,10 @@ theme_override_constants/margin_bottom = 5
36
37
[node name ="Label" type ="Label" parent ="LabelContainer/MarginContainer" ]
37
38
unique_name_in_owner = true
38
39
layout_mode = 2
39
- size_flags_vertical = 1
40
+ size_flags_horizontal = 4
40
41
theme_type_variation = &"FixedSizeLabel"
41
42
text = "Talk"
42
43
horizontal_alignment = 1
43
44
vertical_alignment = 1
45
+
46
+ [connection signal ="resized" from ="LabelContainer/MarginContainer/Label" to ="." method ="_on_label_resized" ]
You can’t perform that action at this time.
0 commit comments