Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions scenes/menus/storybook/components/storybook.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ func _ready() -> void:
_populate_quest_lists()


## 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.queue_free()
for child in right_quest_list.get_children():
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_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
var left_end: int = left_start + quests_per_page
Expand Down