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:
parent
ab3fb9a975
commit
4b84803456
|
@ -644,16 +644,20 @@ func play_animation(play: bool, forward_dir: bool) -> void:
|
|||
|
||||
func _on_NextFrame_pressed() -> void:
|
||||
var project := Global.current_project
|
||||
project.selected_cels.clear()
|
||||
if project.current_frame < project.frames.size() - 1:
|
||||
project.selected_cels.clear()
|
||||
project.change_cel(project.current_frame + 1, -1)
|
||||
else:
|
||||
project.change_cel(0, -1)
|
||||
|
||||
|
||||
func _on_PreviousFrame_pressed() -> void:
|
||||
var project := Global.current_project
|
||||
project.selected_cels.clear()
|
||||
if project.current_frame > 0:
|
||||
project.selected_cels.clear()
|
||||
project.change_cel(project.current_frame - 1, -1)
|
||||
else:
|
||||
project.change_cel(project.frames.size() - 1, -1)
|
||||
|
||||
|
||||
func _on_LastFrame_pressed() -> void:
|
||||
|
|
Loading…
Reference in a new issue