29 lines
564 B
GDScript
29 lines
564 B
GDScript
extends Control
|
|
|
|
signal manage_pageflip(give_control: bool)
|
|
|
|
func _ready() -> void:
|
|
manage_pageflip.connect(_on_manage_pageflip)
|
|
|
|
func _on_manage_pageflip(give_control: bool) -> void:
|
|
var tweens: Array[ContainerTween] = []
|
|
for child in find_children("*", "", true, false):
|
|
if child is ContainerTween:
|
|
tweens.append(child)
|
|
for tween in tweens:
|
|
if give_control:
|
|
tween.stop_tween()
|
|
else:
|
|
tween.start_tween()
|
|
|
|
if give_control:
|
|
on_page_closed()
|
|
else:
|
|
on_page_opened()
|
|
|
|
func on_page_opened() -> void:
|
|
pass
|
|
|
|
func on_page_closed() -> void:
|
|
pass
|