The bar is rounded and a little taller, with a round orange play button and a restart button that lights up orange under the mouse. The icons sit inside their buttons with room around them, and are one colour, cropped to their shape. Progress fills in orange, the volume slider gets a speaker icon, and the buttons say their shortcut keys in their tooltips. Buttons grow a little under the mouse and shrink while held down, and the play button pops when it switches between play and pause. ButtonBounce holds these animations so other buttons can use them too.
128 lines
3.8 KiB
Plaintext
128 lines
3.8 KiB
Plaintext
[gd_scene format=3 uid="uid://ds15cgsf8vpvc"]
|
|
|
|
[ext_resource type="Script" uid="uid://d1v0rquma6nt8" path="res://player/music_player.gd" id="1_t24ra"]
|
|
[ext_resource type="AudioStream" uid="uid://n2g8jddr85h2" path="res://sounds/01. Opening.mp3" id="2_xti80"]
|
|
[ext_resource type="Texture2D" path="res://icons/play_button_icon.svg" id="3_6g308"]
|
|
[ext_resource type="Texture2D" path="res://icons/restart_light_icon.svg" id="4_jleuo"]
|
|
[ext_resource type="Texture2D" path="res://icons/volume_light_icon.svg" id="6_volume"]
|
|
[ext_resource type="PackedScene" uid="uid://w400rnew7453" path="res://player/VolumeSlider.tscn" id="5_iifuj"]
|
|
|
|
[sub_resource type="InputEventKey" id="InputEventKey_r4qo3"]
|
|
device = -1
|
|
alt_pressed = true
|
|
keycode = 88
|
|
physical_keycode = 88
|
|
key_label = 88
|
|
unicode = 120
|
|
|
|
[sub_resource type="Shortcut" id="Shortcut_ipcfh"]
|
|
events = [SubResource("InputEventKey_r4qo3")]
|
|
|
|
[sub_resource type="InputEventKey" id="InputEventKey_2nvce"]
|
|
device = -1
|
|
alt_pressed = true
|
|
keycode = 90
|
|
unicode = 90
|
|
|
|
[sub_resource type="Shortcut" id="Shortcut_i7swq"]
|
|
events = [SubResource("InputEventKey_2nvce")]
|
|
|
|
[node name="MusicPlayer" type="Control"]
|
|
layout_mode = 3
|
|
offset_right = 1792.0
|
|
offset_bottom = 42.0
|
|
mouse_filter = 2
|
|
script = ExtResource("1_t24ra")
|
|
|
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
|
stream = ExtResource("2_xti80")
|
|
bus = &"music"
|
|
|
|
[node name="AudioSoundPlayer" type="AudioStreamPlayer" parent="."]
|
|
stream = ExtResource("2_xti80")
|
|
bus = &"music"
|
|
|
|
[node name="AudioSoundEffectPlayer" type="AudioStreamPlayer" parent="."]
|
|
stream = ExtResource("2_xti80")
|
|
bus = &"music"
|
|
|
|
[node name="PlayerBar" type="PanelContainer" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
mouse_filter = 2
|
|
theme_type_variation = &"PlayerBar"
|
|
|
|
[node name="MusicPlayerContainer" type="HBoxContainer" parent="PlayerBar"]
|
|
layout_mode = 2
|
|
mouse_filter = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="PlayButton" type="Button" parent="PlayerBar/MusicPlayerContainer"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(34, 34)
|
|
layout_mode = 2
|
|
size_flags_vertical = 4
|
|
tooltip_text = "Play or pause (Alt+X)"
|
|
focus_mode = 0
|
|
theme_type_variation = &"PlayerButtonPrimary"
|
|
action_mode = 0
|
|
shortcut = SubResource("Shortcut_ipcfh")
|
|
shortcut_feedback = false
|
|
shortcut_in_tooltip = false
|
|
icon = ExtResource("3_6g308")
|
|
icon_alignment = 1
|
|
expand_icon = true
|
|
|
|
[node name="RestartButton" type="Button" parent="PlayerBar/MusicPlayerContainer"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(34, 34)
|
|
layout_mode = 2
|
|
size_flags_vertical = 4
|
|
tooltip_text = "Restart the song (Alt+Z)"
|
|
focus_mode = 0
|
|
theme_type_variation = &"PlayerButton"
|
|
action_mode = 0
|
|
shortcut = SubResource("Shortcut_i7swq")
|
|
shortcut_feedback = false
|
|
shortcut_in_tooltip = false
|
|
icon = ExtResource("4_jleuo")
|
|
icon_alignment = 1
|
|
expand_icon = true
|
|
|
|
[node name="MusicPlayerSlider" type="HSlider" parent="PlayerBar/MusicPlayerContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 4
|
|
theme_type_variation = &"ProgressSlider"
|
|
scrollable = false
|
|
|
|
[node name="MusicTimeLabel" type="Label" parent="PlayerBar/MusicPlayerContainer"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(120, 0)
|
|
layout_mode = 2
|
|
theme_type_variation = &"PlayerTime"
|
|
text = "00:00 / 00:00"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="VolumeIcon" type="TextureRect" parent="PlayerBar/MusicPlayerContainer"]
|
|
custom_minimum_size = Vector2(22, 22)
|
|
layout_mode = 2
|
|
size_flags_vertical = 4
|
|
mouse_filter = 2
|
|
texture = ExtResource("6_volume")
|
|
expand_mode = 1
|
|
stretch_mode = 5
|
|
|
|
[node name="VolumeSlider" parent="PlayerBar/MusicPlayerContainer" instance=ExtResource("5_iifuj")]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(110, 0)
|
|
layout_mode = 2
|
|
size_flags_vertical = 4
|
|
tooltip_text = "Volume"
|
|
theme_type_variation = &"VolumeBar"
|