add sounds and adjust music
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=17 format=2]
|
||||
|
||||
[ext_resource path="res://assets/fonts/data/PixelOperator.tres" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://assets/fonts/data/PixelOperator-Bold.tres" type="DynamicFontData" id=2]
|
||||
[ext_resource path="res://monitor/Rut.gd" type="Script" id=3]
|
||||
[ext_resource path="res://monitor/UISounds.gd" type="Script" id=4]
|
||||
[ext_resource path="res://monitor/EnterButton.gd" type="Script" id=5]
|
||||
[ext_resource path="res://assets/sounds/ui_popup.wav" type="AudioStream" id=6]
|
||||
[ext_resource path="res://assets/sounds/ui_select.wav" type="AudioStream" id=7]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
font_data = ExtResource( 1 )
|
||||
@@ -77,6 +80,15 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_min_size = Vector2( 512, 0 )
|
||||
|
||||
[node name="Sounds" type="Node" parent="GUI"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Popup" type="AudioStreamPlayer" parent="GUI/Sounds"]
|
||||
stream = ExtResource( 6 )
|
||||
|
||||
[node name="Menu" type="AudioStreamPlayer" parent="GUI/Sounds"]
|
||||
stream = ExtResource( 7 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GUI"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -221,6 +233,11 @@ align = 1
|
||||
valign = 1
|
||||
autowrap = true
|
||||
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Name" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="text_changed" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" to="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" method="_on_Rut_text_changed"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Email" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer3/Button" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="pressed" from="GUI/VBoxContainer/CenterContainer3/Button" to="GUI/VBoxContainer/CenterContainer3/Button" method="_on_Button_pressed"]
|
||||
[connection signal="focus_entered" from="PopupDialog" to="GUI/Sounds" method="_play_popup_sound"]
|
||||
[connection signal="gui_input" from="PopupDialog" to="GUI/VBoxContainer/CenterContainer3/Button" method="_on_PopupDialog_gui_input"]
|
||||
|
9
godot/monitor/UISounds.gd
Normal file
9
godot/monitor/UISounds.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends Node
|
||||
|
||||
|
||||
func _play_popup_sound() -> void:
|
||||
$Popup.play()
|
||||
|
||||
|
||||
func _play_ui_select_sound() -> void:
|
||||
$Menu.play()
|
Reference in New Issue
Block a user