2024-10-07 09:16:18 +00:00
|
|
|
class_name SettingsPopup extends PanelContainer
|
|
|
|
|
|
2025-12-12 16:18:04 +00:00
|
|
|
func _ready() -> void:
|
|
|
|
|
get_parent_control().visible = false
|
|
|
|
|
|
2025-10-29 21:37:17 +00:00
|
|
|
func show_settings(id: int = -1):
|
2025-12-12 16:18:04 +00:00
|
|
|
get_parent_control().visible = true
|
2024-10-07 09:16:18 +00:00
|
|
|
$AnimationPlayer.play("reveal")
|
2025-12-12 16:18:04 +00:00
|
|
|
await $AnimationPlayer.animation_finished
|
2025-10-29 21:37:17 +00:00
|
|
|
if not id == -1:
|
|
|
|
|
$TabContainer.current_tab = id
|
2024-10-07 09:16:18 +00:00
|
|
|
State.pass_stage_to($TabContainer)
|
|
|
|
|
|
|
|
|
|
func vanish():
|
2025-10-29 21:37:17 +00:00
|
|
|
State.save_settings()
|
2025-12-12 16:18:04 +00:00
|
|
|
$AnimationPlayer.play("vanish")
|
|
|
|
|
await $AnimationPlayer.animation_finished
|
|
|
|
|
get_parent_control().visible = false
|