Godot Version
4.2.1
Question
I’m trying to grasp some of the basics, but this question has really eluded me so far: I want to make a contextual button that does different things at different times. Specifically, clicking it will show a screen and change the button text, clicking the button again will show a different screen and change the button text again, etc.
Think of it like the “next” button for a slideshow- it progresses through the slides one at a time before looping back to slide 1. Right now I have a singular _on_pressed function and a way to emit signals marking the “slide number” of the screen currently being shown, I just can’t figure out how to mix the two. What my end goal is:
func _on_pressed():
if pagenumber==1
signal turn to page number 2
if pagenumber==2
signal turn to page number 3
Sorry if this is a pretty basic question but I truly can not figure this out after reading the documentation and searching the forums.