MusicTimer/Scenes/TimerHUD.tscn
2024-03-26 12:33:16 +01:00

197 lines
4.8 KiB
Plaintext

[gd_scene load_steps=5 format=3 uid="uid://bsafhva6xh2nf"]
[ext_resource type="Script" path="res://Scripts/TimerHUD.gd" id="1_k2tpr"]
[ext_resource type="PackedScene" uid="uid://cxho0ur4g4r2c" path="res://Scenes/circular_progress_bar.tscn" id="2_ptdoy"]
[ext_resource type="AudioStream" uid="uid://cfn6m777tj8sy" path="res://Assets/Bob_lennon_-_Gutalala_sudalala.mp3" id="3_nfvhu"]
[sub_resource type="LabelSettings" id="LabelSettings_gikwe"]
font_size = 100
[node name="TimerHUD" type="CanvasLayer"]
script = ExtResource("1_k2tpr")
[node name="Timer" type="Timer" parent="."]
[node name="RemainingTime" type="Label" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -240.0
offset_top = -183.0
offset_right = 240.0
offset_bottom = -46.0
grow_horizontal = 2
grow_vertical = 2
text = "xx:xx"
label_settings = SubResource("LabelSettings_gikwe")
horizontal_alignment = 1
vertical_alignment = 1
[node name="PlayButton" type="Button" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -50.0
offset_top = -208.0
offset_right = 50.0
offset_bottom = -158.0
grow_horizontal = 2
grow_vertical = 0
size_flags_vertical = 6
text = "PLAY"
[node name="PauseButton" type="Button" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -153.5
offset_top = -208.0
offset_right = -53.5
offset_bottom = -158.0
grow_horizontal = 2
grow_vertical = 0
text = "Pause
"
[node name="StopButton" type="Button" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = 52.98
offset_top = -208.0
offset_right = 152.98
offset_bottom = -158.0
grow_horizontal = 2
grow_vertical = 0
text = "Stop
"
[node name="EditButton" type="Button" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = 166.0
offset_top = -197.0
offset_right = 206.0
offset_bottom = -166.0
grow_horizontal = 2
grow_vertical = 0
size_flags_vertical = 6
text = "Edit"
[node name="MinutesLabel" type="Label" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -88.5
offset_top = -138.0
offset_right = -25.5
offset_bottom = -115.0
grow_horizontal = 2
grow_vertical = 0
text = "Minutes"
[node name="SecondsLabel" type="Label" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = 20.0
offset_top = -138.0
offset_right = 84.0
offset_bottom = -115.0
grow_horizontal = 2
grow_vertical = 0
text = "Seconds"
[node name="SpinBoxMinutes" type="SpinBox" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -100.0
offset_top = -98.0
offset_bottom = -48.0
grow_horizontal = 2
grow_vertical = 0
max_value = 60.0
alignment = 2
editable = false
[node name="SpinBoxSeconds" type="SpinBox" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = 10.0
offset_top = -98.0
offset_right = 110.0
offset_bottom = -48.0
grow_horizontal = 2
grow_vertical = 0
max_value = 59.0
alignment = 2
editable = false
[node name="CircularProgressBar" parent="." instance=ExtResource("2_ptdoy")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 1.52588e-05
offset_top = -104.0
offset_right = 1.52588e-05
offset_bottom = -104.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 4
[node name="VolumeSlider" type="HSlider" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -144.0
offset_top = 90.0
offset_right = 152.0
offset_bottom = 110.0
grow_horizontal = 2
grow_vertical = 2
min_value = -24.0
max_value = 0.0
value = -12.0
[node name="BackgroundMusic" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_nfvhu")
volume_db = -28.0
[node name="HBoxContainer" type="HBoxContainer" parent="."]
offset_right = 40.0
offset_bottom = 40.0
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
[connection signal="pressed" from="PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="PauseButton" to="." method="_on_pause_button_pressed"]
[connection signal="pressed" from="StopButton" to="." method="_on_stop_button_pressed"]
[connection signal="pressed" from="EditButton" to="." method="_on_edit_button_pressed"]
[connection signal="value_changed" from="SpinBoxMinutes" to="." method="_on_spin_box_minutes_value_changed"]
[connection signal="value_changed" from="SpinBoxSeconds" to="." method="_on_spin_box_seconds_value_changed"]
[connection signal="drag_ended" from="VolumeSlider" to="." method="_on_volume_slider_drag_ended"]