carousel code cleanup

This commit is contained in:
Nordup 2025-08-13 19:36:26 +07:00
parent 572bf851fa
commit a2e1121fec
2 changed files with 95 additions and 80 deletions

View file

@ -18,7 +18,6 @@ func _ready() -> void:
visible = true
root.visible = false
root.modulate = HIDDEN
root.mouse_filter = Control.MOUSE_FILTER_PASS
await get_tree().create_timer(INITIAL_DELAY).timeout
show_onboarding()
@ -32,16 +31,11 @@ func show_onboarding() -> void:
if is_instance_valid(tween): tween.stop()
tween = create_tween()
tween.tween_property(root, "modulate", SHOWN, fade_in)
await tween.finished
root.mouse_filter = Control.MOUSE_FILTER_STOP
func hide_onboarding() -> void:
if not root.visible: return
root.mouse_filter = Control.MOUSE_FILTER_PASS
if is_instance_valid(tween): tween.stop()
tween = create_tween()
tween.tween_property(root, "modulate", HIDDEN, fade_out)