1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Loop through frames when clicking on go to previous/next frame buttons on the timeline

This commit is contained in:
Emmanouil Papadeas 2023-11-29 02:47:33 +02:00
parent ab3fb9a975
commit 4b84803456

View file

@ -644,16 +644,20 @@ func play_animation(play: bool, forward_dir: bool) -> void:
func _on_NextFrame_pressed() -> void:
var project := Global.current_project
if project.current_frame < project.frames.size() - 1:
project.selected_cels.clear()
if project.current_frame < project.frames.size() - 1:
project.change_cel(project.current_frame + 1, -1)
else:
project.change_cel(0, -1)
func _on_PreviousFrame_pressed() -> void:
var project := Global.current_project
if project.current_frame > 0:
project.selected_cels.clear()
if project.current_frame > 0:
project.change_cel(project.current_frame - 1, -1)
else:
project.change_cel(project.frames.size() - 1, -1)
func _on_LastFrame_pressed() -> void: