fix focus of buttons

This commit is contained in:
Mylloon 2023-02-26 17:54:18 +01:00
parent 8232a4382a
commit 0f5fbe23b0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 6 additions and 0 deletions

View file

@ -43,6 +43,7 @@ margin_left = -128.0
margin_top = -32.0
margin_right = 149.0
margin_bottom = 37.0
focus_mode = 0
theme = SubResource( 1 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )

View file

@ -15,6 +15,7 @@ func _ready() -> void:
var nbDossier = rng.randi_range(0, 3)
for i in range(nbDossier):
var dossier = get_child(2).duplicate()
dossier.get_child(0).get_child(3).get_child(1).focus_mode = Button.FOCUS_NONE
dossier.position = Vector2(dossier.position.x, dossier.position.y + 150 * (i + 1))
dossier.set_z_index(dossier.get_z_index() + 10 * (i + 1))
add_child(dossier)

View file

@ -33,6 +33,7 @@ margin_left = 312.0
margin_top = 632.0
margin_right = 724.0
margin_bottom = 693.0
focus_mode = 0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )
custom_fonts/font = ExtResource( 7 )

View file

@ -34,6 +34,7 @@ volume_db = -7.0
margin_top = 34.0
margin_right = 136.0
margin_bottom = 71.0
focus_mode = 0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )
custom_fonts/font = ExtResource( 2 )
@ -46,6 +47,7 @@ text = "PLAY"
margin_top = 97.0
margin_right = 136.0
margin_bottom = 134.0
focus_mode = 0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )
custom_fonts/font = ExtResource( 2 )
@ -58,6 +60,7 @@ text = "HELP"
margin_top = 160.0
margin_right = 136.0
margin_bottom = 197.0
focus_mode = 0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )
custom_fonts/font = ExtResource( 2 )