forked from unfa/liblast
Implemented basic menu sounds.
parent
f8fa335207
commit
e21c91b8c4
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://b856vwmg8a6o4"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b856vwmg8a6o4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d135tevauvmoq" path="res://Assets/UI/MenuButton.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" path="res://Assets/UI/Menu.tscn" id="2"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2d0sbb84rehm" path="res://Assets/UI/Menu.tscn" id="2"]
|
||||
[ext_resource type="Script" path="res://Assets/UI/GUI.gd" id="3"]
|
||||
[ext_resource type="AudioStream" uid="uid://dfxftf2huumhn" path="res://Assets/SFX/UI_Cancel.wav" id="4_lnh50"]
|
||||
|
||||
[node name="GUI" type="CenterContainer"]
|
||||
anchor_right = 1.0
|
||||
|
@ -36,5 +37,10 @@ offset_bottom = 95.0
|
|||
text = "quit"
|
||||
label = "quit"
|
||||
|
||||
[node name="ClickSound" parent="Menu/Quit" index="0"]
|
||||
stream = ExtResource( "4_lnh50" )
|
||||
|
||||
[connection signal="pressed" from="Menu/Options" to="Menu" method="open_menu" binds= ["res://Assets/UI/OptionsMenu.tscn"]]
|
||||
[connection signal="pressed" from="Menu/Quit" to="." method="quit_game"]
|
||||
|
||||
[editable path="Menu/Quit"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cd6qhohan2oa1"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://Assets/UI/Menu.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2d0sbb84rehm" path="res://Assets/UI/Menu.tscn" id="1"]
|
||||
[ext_resource type="Script" path="res://Assets/UI/GraphicsMenu.gd" id="2"]
|
||||
[ext_resource type="PackedScene" uid="uid://bl1fc5cl4fcav" path="res://Assets/UI/MenuCheckButton.tscn" id="3"]
|
||||
|
||||
|
|
|
@ -16,7 +16,10 @@ func open_menu(path : String):
|
|||
hide()
|
||||
|
||||
func go_back():
|
||||
$Back/ClickSound.play()
|
||||
previous_menu.show()
|
||||
previous_menu = null
|
||||
queue_free()
|
||||
|
||||
func _on_Back_mouse_entered():
|
||||
$Back/HoverSound.play()
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d2d0sbb84rehm"]
|
||||
|
||||
[ext_resource path="res://Assets/UI/Menu.gd" type="Script" id=1]
|
||||
[ext_resource type="Script" path="res://Assets/UI/Menu.gd" id="1"]
|
||||
[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_nkrit"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_qqhse"]
|
||||
|
||||
[node name="Menu" type="VBoxContainer"]
|
||||
offset_left = 475.0
|
||||
offset_top = 269.0
|
||||
offset_right = 548.0
|
||||
offset_bottom = 331.0
|
||||
script = ExtResource( 1 )
|
||||
script = ExtResource( "1" )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -19,4 +21,13 @@ text = "back
|
|||
"
|
||||
script = null
|
||||
|
||||
[node name="ClickSound" type="AudioStreamPlayer" parent="Back"]
|
||||
stream = ExtResource( "2_nkrit" )
|
||||
script = null
|
||||
|
||||
[node name="HoverSound" type="AudioStreamPlayer" parent="Back"]
|
||||
stream = ExtResource( "3_qqhse" )
|
||||
script = null
|
||||
|
||||
[connection signal="mouse_entered" from="Back" to="." method="_on_Back_mouse_entered"]
|
||||
[connection signal="pressed" from="Back" to="." method="go_back"]
|
||||
|
|
|
@ -2,3 +2,9 @@ extends "res://Assets/UI/MenuItem.gd"
|
|||
|
||||
func on_label_changed():
|
||||
self.text = label
|
||||
|
||||
func _on_MenuButton_mouse_entered():
|
||||
$HoverSound.play()
|
||||
|
||||
func _on_MenuButton_pressed():
|
||||
$ClickSound.play()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d135tevauvmoq"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d135tevauvmoq"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/UI/MenuButton.gd" id="1"]
|
||||
[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_nyr44"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_g8hw6"]
|
||||
|
||||
[node name="MenuButton" type="Button"]
|
||||
anchor_right = 1.0
|
||||
|
@ -9,3 +11,14 @@ script = ExtResource( "1" )
|
|||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ClickSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "2_nyr44" )
|
||||
script = null
|
||||
|
||||
[node name="HoverSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "3_g8hw6" )
|
||||
script = null
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_MenuButton_mouse_entered"]
|
||||
[connection signal="pressed" from="." to="." method="_on_MenuButton_pressed"]
|
||||
|
|
|
@ -9,3 +9,7 @@ func on_label_changed():
|
|||
|
||||
func on_toggle(button_pressed):
|
||||
data = button_pressed
|
||||
$ClickSound.play()
|
||||
|
||||
func _on_MenuCheckButton_mouse_entered():
|
||||
$HoverSound.play()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bl1fc5cl4fcav"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bl1fc5cl4fcav"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/UI/MenuCheckButton.gd" id="1"]
|
||||
[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_d1dx2"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_pitbq"]
|
||||
|
||||
[node name="MenuCheckButton" type="CheckButton"]
|
||||
anchor_right = 1.0
|
||||
|
@ -10,4 +12,13 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ClickSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "2_d1dx2" )
|
||||
script = null
|
||||
|
||||
[node name="HoverSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "3_pitbq" )
|
||||
script = null
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_MenuCheckButton_mouse_entered"]
|
||||
[connection signal="toggled" from="." to="." method="on_toggle"]
|
||||
|
|
|
@ -9,3 +9,7 @@ func on_label_changed():
|
|||
|
||||
func on_value_changed(value):
|
||||
data = value
|
||||
$ClickSound.play()
|
||||
|
||||
func _on_Slider_mouse_entered():
|
||||
$HoverSound.play()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bwqwic7ex6muv"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bwqwic7ex6muv"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/UI/MenuSlider.gd" id="1_vhxwo"]
|
||||
[ext_resource type="AudioStream" uid="uid://tmb3cqyy8s33" path="res://Assets/SFX/UI_Click.wav" id="2_weawk"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvfvty8gqab0a" path="res://Assets/SFX/UI_Hover.wav" id="3_b58yr"]
|
||||
|
||||
[node name="MenuSlider" type="HBoxContainer"]
|
||||
anchor_right = 1.0
|
||||
|
@ -23,7 +25,18 @@ offset_left = 514.0
|
|||
offset_right = 1024.0
|
||||
offset_bottom = 16.0
|
||||
rect_min_size = Vector2(200, 0)
|
||||
rect_pivot_offset = Vector2(-908, 0)
|
||||
size_flags_horizontal = 3
|
||||
script = null
|
||||
|
||||
[node name="ClickSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "2_weawk" )
|
||||
volume_db = -12.0
|
||||
script = null
|
||||
|
||||
[node name="HoverSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( "3_b58yr" )
|
||||
script = null
|
||||
|
||||
[connection signal="mouse_entered" from="Slider" to="." method="_on_Slider_mouse_entered"]
|
||||
[connection signal="value_changed" from="Slider" to="." method="on_value_changed"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://d37bped35n16j"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://Assets/UI/Menu.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2d0sbb84rehm" path="res://Assets/UI/Menu.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://d135tevauvmoq" path="res://Assets/UI/MenuButton.tscn" id="2"]
|
||||
|
||||
[node name="OptionsMenu" instance=ExtResource( "1" )]
|
||||
|
|
|
@ -6,8 +6,8 @@ enum NetworkRole {NONE, CLIENT, SERVER, DEDICATED_SERVER, RELAY_SERVER}
|
|||
|
||||
const NET_PORT = 12597
|
||||
|
||||
#const NET_SERVER = "liblast.unfa.xyz"
|
||||
const NET_SERVER = "localhost"
|
||||
const NET_SERVER = "liblast.unfa.xyz"
|
||||
#const NET_SERVER = "localhost"
|
||||
|
||||
var peer = ENetMultiplayerPeer.new()
|
||||
|
||||
|
|
Loading…
Reference in New Issue