This commit is contained in:
Isaac Shoebottom 2024-06-27 00:03:20 -03:00
parent 736344e8ad
commit f91e3ddf2b
2 changed files with 21 additions and 4 deletions

View File

@ -31,19 +31,30 @@ anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -262.5
offset_top = -70.0
offset_top = -78.0
offset_right = 262.5
offset_bottom = 70.0
offset_bottom = 78.0
grow_horizontal = 2
grow_vertical = 2
[node name="Sliders" type="HBoxContainer" parent="App"]
layout_mode = 2
[node name="GridContainer" type="GridContainer" parent="App/Sliders"]
[node name="GridContainer" type="HBoxContainer" parent="App/Sliders"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
[node name="ChordVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2
[node name="HSlider" type="HSlider" parent="App/Sliders/GridContainer"]
[node name="NoteVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2
[node name="RhythmVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2
[node name="RhythmTempo" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2
[node name="Buttons" type="HBoxContainer" parent="App"]

View File

@ -2,12 +2,18 @@ extends Node
# Add asset here
var RhythmPlayer: AudioStreamPlayer
var ChordPlayer: AudioStreamPlayer
var NotePlayer: AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready():
RhythmPlayer = get_node("/root/Control/RhythmPlayer")
ChordPlayer = get_node("/root/Control/ChordPlayer")
NotePlayer = get_node("/root/Control/NotePlayer")
self.pressed.connect(button_pressed)
func button_pressed():
# Play chord
RhythmPlayer.stop()
ChordPlayer.stop()
NotePlayer.stop()