Give the sync progress bar colour and animation
Build / test (push) Successful in 1m55s
Build / build (push) Successful in 1m12s

The bar in the Sync popup is now an AnimatedProgressBar: taller, with a
darker track and the theme's accent fill (orange, frost blue in Nord, green
with a gold shine for Christmas). It shows Godot's busy animation until the
server reports progress, glides to each new value, has a soft highlight
sweeping along the filled part inside its rounded corners, and fills and
pops before the result shows. With Reduce animations it only jumps to its
values.

The styles are SyncProgressBar, SyncProgressBarFill and SyncProgressBarText
in every theme. Anim.stop stops a keyed animation without starting an empty
one.

The server now sends sync times as "MM:SS"; the spec is updated from
MusicServer develop (also the linux-package route), and the test data and
screenshots use the new format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SansanandClaude Opus 5.5 committed 2026-10-16 11:13:43 +02:00
1 parent f39865fffc
commit 0862d160e5
20 files changed
+791 -44

No files matched your search

+15 -3
View File
@@ -17,7 +17,7 @@ var has_synced: bool = false
@onready var no_changes_label: Label = %NoChangesLabel
@onready var progress_hbox: HBoxContainer = %ProgressHBoxContainer
@onready var sync_hbox: HBoxContainer = %SyncHBoxContainer
@onready var sync_progress_bar: ProgressBar = %SyncProgressBar
@onready var sync_progress_bar: AnimatedProgressBar = %SyncProgressBar
@onready var soundtracks_added_vbox: VBoxContainer = %SoundtracksAddedVBox
@onready var soundtracks_added_separator: VSeparator = %SoundtracksAddedSeparator
@onready var soundtracks_readded_vbox: VBoxContainer = %SoundtracksReAddedVBox
@@ -77,13 +77,24 @@ func _on_sync_timeout() -> void:
GameLog.debug("data_received: ", data_received)
if data_received != null:
if data_received.has("progress"):
sync_progress_bar.value = int(data_received.progress)
sync_progress_bar.move_to(int(data_received.progress))
sync_time.text = data_received.time_spent if data_received.has("time_spent") else ""
else:
on_sync_finished(data_received)
_finish_progress(data_received)
MusicServerClient.fetch_sync_progress(get_progress)
# Fills the bar and lets it pop before the result takes its place
func _finish_progress(data_received: Dictionary) -> void:
sync_timer.stop()
if Anim.enabled() && progress_hbox.visible:
sync_progress_bar.move_to(sync_progress_bar.max_value)
await get_tree().create_timer(Anim.SLOW).timeout
Anim.pop(sync_progress_bar, 1.04, Anim.SLOW)
await get_tree().create_timer(Anim.SLOW).timeout
on_sync_finished(data_received)
func on_sync_finished(data_received: Dictionary) -> void:
has_synced = true
reset_sync_result()
@@ -218,6 +229,7 @@ func show_sync_result() -> void:
func show_sync_progress() -> void:
sync_title_label.text = "Sync in Progress"
progress_hbox.visible = true
sync_progress_bar.wait()
no_changes_label.visible = false
sync_hbox.visible = false
caught_errors_vbox.visible = false