After a bit of tinkering, and thanks to ALBATI_2005's advice, I was able to go back in and solve the problems I was having. Below is the revised code (with some extra comments to point out the changes). (Spoiler alert: STOP/PASS not working on the Window Frame was due to incorrect targeting.)
In the Pages node (where the original attempt resided):
extends Control
# Node variables
onready var transition_tween := get_node("../TransitionTween")
onready var window_frame := get_node("../WindowFrame")
# Variable to track the current page
onready var current_page = "Page_000"
func navigate_to(next_page: String) -> void:
# Change the Mouse Filter on the WindowFrame node to prevent clicking buttons during the transition between pages.
### I MOVED THE FUNCTION TO TOGGLE THE WindowFrame TO A SCRIPT ATTACHED TO THE WindowFrame NODE ITSELF ###
window_frame.toggle_interaction()
# Tween to fade the currently visible page to transparent.
transition_tween.interpolate_property(get_node(current_page), "modulate:a", 1.0, 0.0, 0.5, Tween.TRANS_QUAD, Tween.EASE_OUT)
# Make sure the current_page is hidden
transition_tween.interpolate_callback(get_node(current_page), 0.5, "hide")
# Show the next page
### I HAD TRIED USING .show() ORIGINALLY, BUT MESSED UP ON MY TARGETING. I FIXED THAT AND GOT RID OF THE enable_butons() FUNCTION ALTOGETHER ###
transition_tween.interpolate_callback(get_node(next_page), 0.5, "show")
transition_tween.interpolate_callback(window_frame, 0.5, "toggle_interaction")
# Make sure the current_page is visible.
get_node(current_page).show()
# Tween to fade the next page from transparent.
transition_tween.interpolate_property(get_node(next_page), "modulate:a", 0.0, 1.0, 0.5, Tween.TRANS_QUAD, Tween.EASE_OUT)
transition_tween.start()
# Update the current page.
### I MOVED THIS LINE BECAUSE TRYING TO UPDATE current_page PRIOR TO THE ABOVE "FADE IN" WAS CONFUSING THE TWEENS ###
current_page = next_page
And in the WindowFrameNode:
extends NinePatchRect
func toggle_interaction() ->void:
# Toggle the mouse_filter to STOP or PASS events through the window_frame
if self.mouse_filter == Control.MOUSE_FILTER_STOP:
self.mouse_filter = Control.MOUSE_FILTER_PASS
elif self.mouse_filter == Control.MOUSE_FILTER_PASS:
self.mouse_filter = Control.MOUSE_FILTER_STOP