bunch of fixes and changes done

This commit is contained in:
Tabby 2026-01-17 17:07:53 +11:00
parent 4a9193e549
commit 73b9a706a3
59 changed files with 940 additions and 68 deletions

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://r5u2un1fds6m"
path="res://.godot/imported/Godot Wild Jam 89 Demo.ogg-9dcd0225c3667337807a990bcf2bd61f.oggvorbisstr"
[deps]
source_file="res://music/Godot Wild Jam 89 Demo.ogg"
dest_files=["res://.godot/imported/Godot Wild Jam 89 Demo.ogg-9dcd0225c3667337807a990bcf2bd61f.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

22
music/music_panel.gd Normal file
View file

@ -0,0 +1,22 @@
extends Control
@export var ambient_player : AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
_on_h_slider_value_changed(0.5)
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_h_slider_value_changed(value: float) -> void:
#var new_db = linear_to_db(value)
AudioServer.set_bus_volume_linear(1, value)
func _on_audio_stream_player_finished() -> void:
ambient_player.play()

1
music/music_panel.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://bjieium3xew23

60
music/music_panel.tscn Normal file
View file

@ -0,0 +1,60 @@
[gd_scene load_steps=4 format=3 uid="uid://dossu7drwmunk"]
[ext_resource type="Texture2D" uid="uid://6es1rrxgg6xs" path="res://assets/icons/volume-up.png" id="1_8ia4e"]
[ext_resource type="Script" uid="uid://bjieium3xew23" path="res://music/music_panel.gd" id="1_52dcn"]
[ext_resource type="AudioStream" uid="uid://r5u2un1fds6m" path="res://music/Godot Wild Jam 89 Demo.ogg" id="3_yx23q"]
[node name="MusicPanel" type="Control" node_paths=PackedStringArray("ambient_player")]
z_index = 4
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_52dcn")
ambient_player = NodePath("AudioStreamPlayer")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
mouse_filter = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
texture = ExtResource("1_8ia4e")
expand_mode = 3
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/separation = -2
alignment = 1
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
text = "Soundtrack"
[node name="HSlider" type="HSlider" parent="PanelContainer/HBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(150, 0)
layout_mode = 2
size_flags_vertical = 4
max_value = 1.0
step = 0.0
value = 0.5
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_yx23q")
autoplay = true
bus = &"Soundtrack"
[connection signal="value_changed" from="PanelContainer/HBoxContainer/VBoxContainer/HSlider" to="." method="_on_h_slider_value_changed"]
[connection signal="finished" from="AudioStreamPlayer" to="." method="_on_audio_stream_player_finished"]