From 48153637a95280a51eb541aba2cb52a321e43424 Mon Sep 17 00:00:00 2001 From: Alonna <145865677+alcole2@users.noreply.github.com> Date: Mon, 10 Aug 2026 14:00:42 -0400 Subject: [PATCH 1/2] Fixing focus for keyboard use Keyboard is useable to click through StoryQuests after a page has been flipped. --- scenes/menus/storybook/components/storybook.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenes/menus/storybook/components/storybook.gd b/scenes/menus/storybook/components/storybook.gd index 46f2e7411..1d89506b0 100644 --- a/scenes/menus/storybook/components/storybook.gd +++ b/scenes/menus/storybook/components/storybook.gd @@ -58,9 +58,9 @@ func _ready() -> void: func _populate_quest_lists() -> void: #Clear out any existing buttons from previous views for child in left_quest_list.get_children(): - child.queue_free() + child.free() for child in right_quest_list.get_children(): - child.queue_free() + child.free() #Calculate the quest slices for this specific book spread var left_start: int = _current_list_page * quests_per_page * 2 From 7d5a5a4c5d194b8c47f3ee286c1b891262bc828c Mon Sep 17 00:00:00 2001 From: Alonna <145865677+alcole2@users.noreply.github.com> Date: Tue, 11 Aug 2026 09:41:31 -0400 Subject: [PATCH 2/2] Detach old buttons before queue_free() to fix page-flip focus This does not use ```.free()``` like the previous commit. Instead, the new ```_clear_list()``` function uses ```remove_child()``` to detach each old StoryQuest button from its container before ```queue_free()``` is called. ```_clear_list()``` is called inside ```_populate_quest_lists()``` so the container's child list is immediately emptied when the page turns. This ensures the focus is on the StoryQuest button on the top of the new page instead of accidentally grabbing a removed node from the previous page. --- scenes/menus/storybook/components/storybook.gd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scenes/menus/storybook/components/storybook.gd b/scenes/menus/storybook/components/storybook.gd index 1d89506b0..8c7ee482b 100644 --- a/scenes/menus/storybook/components/storybook.gd +++ b/scenes/menus/storybook/components/storybook.gd @@ -54,13 +54,16 @@ func _ready() -> void: _populate_quest_lists() -## Clears and regenerates the quest buttons based on the current page view +func _clear_list(quest_list: Node) -> void: + for child: Node in quest_list.get_children(): + quest_list.remove_child(child) + child.queue_free() + + +# Clears and regenerates the quest buttons based on the current page view func _populate_quest_lists() -> void: - #Clear out any existing buttons from previous views - for child in left_quest_list.get_children(): - child.free() - for child in right_quest_list.get_children(): - child.free() + _clear_list(left_quest_list) + _clear_list(right_quest_list) #Calculate the quest slices for this specific book spread var left_start: int = _current_list_page * quests_per_page * 2