diff options
author | ClarkeCode <33846391+ClarkeCode@users.noreply.github.com> | 2023-03-06 22:14:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 22:14:19 +0100 |
commit | ce325c16c0f5d82ed51abd8bd13928a7bc609ba5 (patch) | |
tree | 9684123684de590ecd3be99be034d68f4bc6f8b7 /game/src/MusicConductor/MusicUIController.tscn | |
parent | 95173891f7c5eea7717a58ae4f1438fd09e0ee1f (diff) |
Add Music Player (#49)
* Adding MusicConductor
* Added selectable songs and player visibility toggle
* Refinements to the music system
* SongInfo compatability with various audio formats
* Moved UI reqs to editor description; flipped conditions to exclude music .import files
* Made selection of the first music track extension-agnostic
* Fixed visual bug with play/pause button when interacting with progress slider
Diffstat (limited to 'game/src/MusicConductor/MusicUIController.tscn')
-rw-r--r-- | game/src/MusicConductor/MusicUIController.tscn | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/game/src/MusicConductor/MusicUIController.tscn b/game/src/MusicConductor/MusicUIController.tscn new file mode 100644 index 0000000..49ea355 --- /dev/null +++ b/game/src/MusicConductor/MusicUIController.tscn @@ -0,0 +1,64 @@ +[gd_scene load_steps=2 format=3 uid="uid://dmnqyvl3qfq2e"] + +[ext_resource type="Script" path="res://src/MusicConductor/MusicUIController.gd" id="1_u4qbn"] + +[node name="MusicUIController" type="Control" node_paths=PackedStringArray("songSelectorButton", "progressSlider", "prevSongButton", "playPauseButton", "nextSongButton", "widgetVisibilityButton")] +editor_description = "UI-104" +layout_mode = 3 +anchor_right = 0.11 +anchor_bottom = 0.165 +offset_right = 0.199997 +offset_bottom = 0.199997 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_u4qbn") +songSelectorButton = NodePath("VBoxContainer/SongSelectorButton") +progressSlider = NodePath("VBoxContainer/ProgressSlider") +prevSongButton = NodePath("VBoxContainer/HBoxContainer/PreviousSongButton") +playPauseButton = NodePath("VBoxContainer/HBoxContainer/PlayPauseButton") +nextSongButton = NodePath("VBoxContainer/HBoxContainer/NextSongButton") +widgetVisibilityButton = NodePath("VBoxContainer/MusicUIVisibilityButton") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="SongSelectorButton" type="OptionButton" parent="VBoxContainer"] +editor_description = "UI-107" +layout_mode = 2 + +[node name="ProgressSlider" type="HSlider" parent="VBoxContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 + +[node name="PreviousSongButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +text = "Prev" + +[node name="PlayPauseButton" type="Button" parent="VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(30, 0) +layout_mode = 2 +text = ">" + +[node name="NextSongButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +text = "Next" + +[node name="MusicUIVisibilityButton" type="Button" parent="VBoxContainer"] +editor_description = "UI-106" +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 3 +text = "Hide Player" + +[connection signal="item_selected" from="VBoxContainer/SongSelectorButton" to="." method="_on_option_button_item_selected"] +[connection signal="drag_ended" from="VBoxContainer/ProgressSlider" to="." method="_on_progress_slider_drag_ended"] +[connection signal="drag_started" from="VBoxContainer/ProgressSlider" to="." method="_on_progress_slider_drag_started"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/PreviousSongButton" to="." method="_on_previous_song_button_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/PlayPauseButton" to="." method="_on_play_pause_button_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/NextSongButton" to="." method="_on_next_song_button_pressed"] +[connection signal="pressed" from="VBoxContainer/MusicUIVisibilityButton" to="." method="_on_music_ui_visibility_button_pressed"] |