final is here
This commit is contained in:
@@ -43,9 +43,12 @@ func _ready() -> void:
|
||||
|
||||
# Trier par ordre alphabétique
|
||||
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
|
||||
text += \" 1 Player\"
|
||||
text += \" 1 Player\"
|
||||
for i in range(clamp(5, 0, tableau_paires.size())):
|
||||
text += \"\\n\" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
|
||||
text += \"\\n\" + str(i+1) + \"e \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
|
||||
if tableau_paires.size() < 5:
|
||||
for i in range(5 - tableau_paires.size()):
|
||||
text += \"\\n\" + str(tableau_paires.size()+ i+1) + \"e \" + \"---- : ----\"
|
||||
"
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_u3kfb"]
|
||||
@@ -53,14 +56,16 @@ script/source = "extends Label
|
||||
func _ready() -> void:
|
||||
var tableau_paires = []
|
||||
for key in GameController.score.score_multiplayer:
|
||||
print(key)
|
||||
tableau_paires.append({\"key\": key, \"value\": GameController.score.score_multiplayer[key]})
|
||||
|
||||
# Trier par ordre alphabétique
|
||||
tableau_paires.sort_custom(func(a, b): return a[\"value\"] > b[\"value\"])
|
||||
text += \" 2 Players\"
|
||||
text += \" 2 Players\"
|
||||
for i in range(clamp(5, 0, tableau_paires.size())):
|
||||
text += \"\\n\" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
|
||||
text += \"\\n\" + str(i+1) + \"e \" + tableau_paires[i][\"key\"] + \" : \" + str(tableau_paires[i][\"value\"])
|
||||
if tableau_paires.size() < 5:
|
||||
for i in range(5 - tableau_paires.size()):
|
||||
text += \"\\n\" + str(tableau_paires.size()+ i+1) + \"e \" + \"---- : ----\"
|
||||
"
|
||||
|
||||
[node name="load_screen" type="Node2D"]
|
||||
@@ -82,9 +87,11 @@ load_screen = true
|
||||
|
||||
[node name="Control" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
@@ -95,10 +102,10 @@ anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -75.5
|
||||
offset_top = -55.0
|
||||
offset_right = 75.5
|
||||
offset_bottom = 55.0
|
||||
offset_left = -119.5
|
||||
offset_top = -64.0
|
||||
offset_right = 119.5
|
||||
offset_bottom = 64.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 64
|
||||
@@ -137,16 +144,19 @@ script = SubResource("GDScript_7iavl")
|
||||
|
||||
[node name="scores" type="VBoxContainer" parent="CanvasLayer/Control/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("3_7iavl")
|
||||
theme_override_constants/separation = 64
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/HBoxContainer/scores"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("3_7iavl")
|
||||
theme_override_font_sizes/font_size = 16
|
||||
script = SubResource("GDScript_dogtj")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Control/HBoxContainer/scores"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("3_7iavl")
|
||||
theme_override_font_sizes/font_size = 16
|
||||
script = SubResource("GDScript_u3kfb")
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/Control/HBoxContainer/buttons/1" to="CanvasLayer/Control/HBoxContainer/buttons/1" method="_on_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user