add page flip
This commit is contained in:
@@ -11,6 +11,9 @@ func _ready() -> void:
|
||||
on_tab_pressed(0, true)
|
||||
|
||||
func on_tab_pressed(index: int, disable_animation: bool = false) -> void:
|
||||
if BookAPI.is_busy() and not disable_animation:
|
||||
return
|
||||
|
||||
for page in pages:
|
||||
page.hide_page()
|
||||
|
||||
@@ -28,6 +31,7 @@ func on_tab_pressed(index: int, disable_animation: bool = false) -> void:
|
||||
|
||||
pages[index].show_page()
|
||||
current_index = index
|
||||
BookAPI.go_to_page((index + 1) * 2)
|
||||
|
||||
func open() -> void:
|
||||
pages[current_index].show_page()
|
||||
|
||||
Reference in New Issue
Block a user