#29 Small fixes
This commit is contained in:
+5
-5
@@ -55,10 +55,6 @@ func _ready() -> void:
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if audio_player.has_stream_playback() && !is_changing && !audio_player.stream_paused:
|
||||
print("Settings.hide_beginning: ", Settings.hide_beginning)
|
||||
print("audio_player.get_playback_position(): ", audio_player.get_playback_position())
|
||||
print("audio_player.get_playback_position() >= 5.0: ", audio_player.get_playback_position() >= 5.0)
|
||||
print("(!Settings.hide_beginning && audio_player.get_playback_position() >= 5.0): ", (!Settings.hide_beginning && audio_player.get_playback_position() >= 5.0))
|
||||
if (!Settings.hide_beginning || audio_player.get_playback_position() >= 5.0):
|
||||
progress_slider.value = audio_player.get_playback_position()
|
||||
if stream != null:
|
||||
@@ -72,8 +68,12 @@ func format_time(time: float) -> String:
|
||||
return mins + ":" + sec
|
||||
|
||||
func format_text(part: float, total: float) -> String:
|
||||
if Settings.hide_length:
|
||||
if (Settings.hide_beginning && part <= 5.0) && Settings.hide_length:
|
||||
return "??:?? / ??:??"
|
||||
elif Settings.hide_length:
|
||||
return format_time(part) + " / ??:??"
|
||||
elif Settings.hide_beginning && part <= 5.0:
|
||||
return "??:?? / " + format_time(total)
|
||||
else:
|
||||
return format_time(part) + " / " + format_time(total)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user