fix bug score + titre + message game over dans les settings + ajout background
This commit is contained in:
parent
1382b02f3c
commit
7009740520
4 changed files with 47 additions and 23 deletions
|
@ -21,11 +21,15 @@ func show_message(text):
|
|||
func show_partie_perdue():
|
||||
$"Menu Principal/ButtonStart".show()
|
||||
$"Menu Principal/ButtonSettings".show()
|
||||
$"Menu Principal/LabelTitre".show()
|
||||
$"Menu Principal/LabelGameScore".hide()
|
||||
$"Menu Principal/LabelGameRecord".hide()
|
||||
$"Menu Principal/LabelMenuScore".show()
|
||||
$"Menu Principal/LabelMenuRecord".show()
|
||||
show_message("Perdu !")
|
||||
|
||||
func update_score(score):
|
||||
$"Menu Principal/LabelScore".text = str(score)
|
||||
$"Menu Principal/LabelMenuScore".text = str(score)
|
||||
$"Menu Principal/LabelGameScore".text = str(score)
|
||||
|
||||
func _on_TimerMessage_timeout():
|
||||
$LabelMessage.hide()
|
||||
|
@ -33,8 +37,11 @@ func _on_TimerMessage_timeout():
|
|||
func _on_ButtonStart_pressed():
|
||||
$"Menu Principal/ButtonStart".hide()
|
||||
emit_signal("lancement_partie")
|
||||
$"Menu Principal/LabelTitre".hide()
|
||||
$"Menu Principal/ButtonSettings".hide()
|
||||
$"Menu Principal/LabelGameScore".show()
|
||||
$"Menu Principal/LabelGameRecord".show()
|
||||
$"Menu Principal/LabelMenuScore".hide()
|
||||
$"Menu Principal/LabelMenuRecord".hide()
|
||||
|
||||
func _on_ButtonSettings_pressed():
|
||||
for i in $"Menu Principal".get_children():
|
||||
|
@ -48,6 +55,7 @@ func cacher_settings(): # on cache les settings
|
|||
func montrer_settings(): # on affiche les settings
|
||||
for i in $Settings.get_children():
|
||||
i.show()
|
||||
$LabelMessage.hide()
|
||||
|
||||
func _on_ButtonBackToMenu_pressed():
|
||||
for i in $"Menu Principal".get_children():
|
||||
|
|
|
@ -22,7 +22,37 @@ script = ExtResource( 1 )
|
|||
|
||||
[node name="Menu Principal" type="Node" parent="."]
|
||||
|
||||
[node name="LabelRecord" type="Label" parent="Menu Principal"]
|
||||
[node name="LabelMenuRecord" type="Label" parent="Menu Principal"]
|
||||
margin_left = 200.236
|
||||
margin_top = 464.62
|
||||
margin_right = 332.236
|
||||
margin_bottom = 518.62
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "Record"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LabelMenuScore" type="Label" parent="Menu Principal"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -62.0
|
||||
margin_top = 496.0
|
||||
margin_right = 33.0
|
||||
margin_bottom = 558.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "0"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LabelGameRecord" type="Label" parent="Menu Principal"]
|
||||
visible = false
|
||||
margin_left = 217.236
|
||||
margin_top = 18.6199
|
||||
margin_right = 349.236
|
||||
|
@ -35,7 +65,8 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LabelScore" type="Label" parent="Menu Principal"]
|
||||
[node name="LabelGameScore" type="Label" parent="Menu Principal"]
|
||||
visible = false
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -45.0
|
||||
|
@ -66,21 +97,6 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LabelTitre" type="Label" parent="Menu Principal"]
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_top = -136.0
|
||||
margin_bottom = -82.0
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "Yokai Survive"
|
||||
align = 1
|
||||
autowrap = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ButtonSettings" type="Button" parent="Menu Principal"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
|
@ -210,9 +226,9 @@ one_shot = true
|
|||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -240.0
|
||||
margin_top = 150.0
|
||||
margin_top = 122.0
|
||||
margin_right = 240.0
|
||||
margin_bottom = 14.0
|
||||
margin_bottom = 176.0
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
align = 1
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 40 KiB |
Reference in a new issue