Addd sound when user click

This commit is contained in:
VAILLANT Jeremy
2021-05-23 21:48:01 +02:00
parent 2b0662da9b
commit fa9838fa87
7 changed files with 56 additions and 63 deletions
+19 -17
View File
@@ -177,7 +177,7 @@ __meta__ = {
[node name="PanelWood" type="Panel" parent="."]
material = SubResource( 17 )
margin_right = 350.0
margin_bottom = 900.0
margin_bottom = 720.0
rect_min_size = Vector2( 350, 0 )
size_flags_vertical = 3
@@ -194,15 +194,15 @@ __meta__ = {
[node name="CenterContainer" type="CenterContainer" parent="PanelWood/VBoxContainer"]
margin_right = 350.0
margin_bottom = 237.0
margin_bottom = 147.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TextureRect" type="TextureButton" parent="PanelWood/VBoxContainer/CenterContainer"]
margin_left = 111.0
margin_top = 54.0
margin_top = 9.0
margin_right = 239.0
margin_bottom = 182.0
margin_bottom = 137.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 4
size_flags_vertical = 4
@@ -212,9 +212,9 @@ texture_focused = ExtResource( 6 )
stretch_mode = 3
[node name="ButtonPuzzle" type="TextureButton" parent="PanelWood/VBoxContainer"]
margin_top = 267.0
margin_top = 177.0
margin_right = 350.0
margin_bottom = 344.0
margin_bottom = 254.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
@@ -241,9 +241,9 @@ __meta__ = {
}
[node name="ButtonSetting" type="TextureButton" parent="PanelWood/VBoxContainer"]
margin_top = 374.0
margin_top = 284.0
margin_right = 350.0
margin_bottom = 451.0
margin_bottom = 361.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
@@ -270,15 +270,15 @@ __meta__ = {
}
[node name="MarginContainer" type="MarginContainer" parent="PanelWood/VBoxContainer"]
margin_top = 481.0
margin_top = 391.0
margin_right = 350.0
margin_bottom = 719.0
margin_bottom = 539.0
size_flags_vertical = 3
[node name="ButtonQuit" type="TextureButton" parent="PanelWood/VBoxContainer"]
margin_top = 749.0
margin_top = 569.0
margin_right = 350.0
margin_bottom = 826.0
margin_bottom = 646.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
@@ -304,23 +304,23 @@ __meta__ = {
}
[node name="LabelVersion" type="Label" parent="PanelWood/VBoxContainer"]
margin_top = 856.0
margin_top = 676.0
margin_right = 350.0
margin_bottom = 870.0
margin_bottom = 690.0
size_flags_vertical = 0
text = "v XX.XX"
align = 2
[node name="MarginContainerBottom" type="MarginContainer" parent="PanelWood/VBoxContainer"]
margin_top = 900.0
margin_top = 720.0
margin_right = 350.0
margin_bottom = 900.0
margin_bottom = 720.0
size_flags_stretch_ratio = 0.2
[node name="TextureRect" type="TextureRect" parent="."]
margin_left = 350.0
margin_right = 446.0
margin_bottom = 900.0
margin_bottom = 720.0
rect_clip_content = true
size_flags_horizontal = 11
size_flags_vertical = 3
@@ -329,3 +329,5 @@ stretch_mode = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ClickButton" type="AudioStreamPlayer" parent="."]
+5 -5
View File
@@ -64,25 +64,25 @@ margin_right = 153.0
margin_bottom = 40.0
align = 1
[node name="ambiant_sound" type="CenterContainer" parent="VBoxContainer"]
[node name="ambient_sound" type="CenterContainer" parent="VBoxContainer"]
margin_top = 62.0
margin_right = 185.0
margin_bottom = 102.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ambiant_sound"]
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ambient_sound"]
margin_right = 185.0
margin_bottom = 40.0
[node name="Label" type="Label" parent="VBoxContainer/ambiant_sound/HBoxContainer"]
[node name="Label" type="Label" parent="VBoxContainer/ambient_sound/HBoxContainer"]
margin_top = 13.0
margin_right = 105.0
margin_bottom = 27.0
text = "Ambiant sound :"
[node name="data" type="CheckButton" parent="VBoxContainer/ambiant_sound/HBoxContainer"]
[node name="data" type="CheckButton" parent="VBoxContainer/ambient_sound/HBoxContainer"]
margin_left = 109.0
margin_right = 185.0
margin_bottom = 40.0
[connection signal="pressed" from="VBoxContainer/gyroscope/HBoxContainer/data" to="." method="_on_gyroscope_pressed"]
[connection signal="pressed" from="VBoxContainer/ambiant_sound/HBoxContainer/data" to="." method="_on_ambiant_sound_pressed"]
[connection signal="pressed" from="VBoxContainer/ambient_sound/HBoxContainer/data" to="." method="_on_ambiant_sound_pressed"]
+4 -4
View File
@@ -11,8 +11,8 @@ __meta__ = {
}
[node name="TextureRect" type="TextureRect" parent="."]
margin_left = 385.0
margin_top = 372.0
margin_right = 1054.0
margin_bottom = 528.0
margin_left = 305.0
margin_top = 282.0
margin_right = 974.0
margin_bottom = 438.0
texture = ExtResource( 1 )