add audio resyncing

This commit is contained in:
Persephone Bubblegum-Holiday 2025-08-05 10:40:52 -07:00
parent 23137bf834
commit 8230ef5d93
2 changed files with 3 additions and 0 deletions

View file

@ -218,6 +218,7 @@ grow_vertical = 2
[node name="InvisibleMask" type="Control" parent="FlowControlsScreen/DialogPanel"] [node name="InvisibleMask" type="Control" parent="FlowControlsScreen/DialogPanel"]
clip_contents = true clip_contents = true
layout_mode = 1 layout_mode = 1
anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = 4.0 offset_left = 4.0
@ -298,6 +299,7 @@ grow_vertical = 2
[node name="InvisibleMask" type="Control" parent="CosmeticsScreen/DialogPanel"] [node name="InvisibleMask" type="Control" parent="CosmeticsScreen/DialogPanel"]
clip_contents = true clip_contents = true
layout_mode = 1 layout_mode = 1
anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = 4.0 offset_left = 4.0

View file

@ -220,6 +220,7 @@ func _physics_process(_delta: float) -> void:
prev_frame_held[j] = false prev_frame_held[j] = false
j+=1 j+=1
index += 1 index += 1
if (index % 60 == 0): index = int($AudioStreamPlayer.get_playback_position() * 60)
if (index <= 0): _on_stop_button_pressed() if (index <= 0): _on_stop_button_pressed()
update_time_label() update_time_label()