From a4e845086c347731b8f1147f66783f0c9b9f7784 Mon Sep 17 00:00:00 2001 From: dkg-0717 Date: Mon, 20 Apr 2026 19:10:34 -0600 Subject: [PATCH] storybook: hide nav arrows at page boundaries Hides the left arrow on the first page and the right arrow on the last page. Removes circular wrap-around navigation since books don't loop from the last page back to the first. --- scenes/menus/storybook/components/storybook.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scenes/menus/storybook/components/storybook.gd b/scenes/menus/storybook/components/storybook.gd index bfce01260f..c1281644f3 100644 --- a/scenes/menus/storybook/components/storybook.gd +++ b/scenes/menus/storybook/components/storybook.gd @@ -84,6 +84,9 @@ func _ready() -> void: ## Show/hide index or detail pages func _update_page_visibility() -> void: + left_button.visible = _current_spread_index > 0 + right_button.visible = _current_spread_index < _quests.size() + if _current_spread_index == 0: quest_container.visible = true storybook_page.visible = false @@ -117,10 +120,8 @@ func _switch_to_page(spread_index: int) -> void: if total_spreads <= 1: return - if spread_index < 0: - spread_index = total_spreads - 1 - if spread_index >= total_spreads: - spread_index = 0 + if spread_index < 0 or spread_index >= total_spreads: + return if spread_index == _current_spread_index: return