#9 #32 #33 : New winner screen, new setting for hide beginning and fixed bug
Build / build (push) Successful in 1m25s

This commit is contained in:
2026-05-16 17:46:09 +02:00
parent acd8d65b95
commit 899e99864f
12 changed files with 239 additions and 158 deletions
+7 -7
View File
@@ -55,12 +55,12 @@ func _ready() -> void:
func _process(_delta: float) -> void:
if audio_player.has_stream_playback() && !is_changing && !audio_player.stream_paused:
if (!Settings.hide_beginning || audio_player.get_playback_position() >= 5.0):
if (!Settings.hide_beginning || audio_player.get_playback_position() > Settings.hide_for_seconds):
progress_slider.value = audio_player.get_playback_position()
if stream != null:
music_time_label.text = format_text(progress_slider.value, stream.get_length())
else:
music_time_label.text = format_text(progress_slider.value, 0.0)
if stream != null:
music_time_label.text = format_text(progress_slider.value, stream.get_length())
else:
music_time_label.text = format_text(progress_slider.value, 0.0)
func format_time(time: float) -> String:
var mins: String = "%02d" % floor(time / 60)
@@ -68,11 +68,11 @@ func format_time(time: float) -> String:
return mins + ":" + sec
func format_text(part: float, total: float) -> String:
if (Settings.hide_beginning && part <= 5.0) && Settings.hide_length:
if (Settings.hide_beginning && part <= Settings.hide_for_seconds) && Settings.hide_length:
return "??:?? / ??:??"
elif Settings.hide_length:
return format_time(part) + " / ??:??"
elif Settings.hide_beginning && part <= 5.0:
elif Settings.hide_beginning && part < Settings.hide_for_seconds:
return "??:?? / " + format_time(total)
else:
return format_time(part) + " / " + format_time(total)