19 lines
499 B
GDScript
19 lines
499 B
GDScript
class_name SettingsPopup extends PanelContainer
|
|
|
|
func _ready() -> void:
|
|
get_parent_control().visible = false
|
|
|
|
func show_settings(id: int = -1):
|
|
get_parent_control().visible = true
|
|
$AnimationPlayer.play("reveal")
|
|
await $AnimationPlayer.animation_finished
|
|
if not id == -1:
|
|
$TabContainer.current_tab = id
|
|
State.pass_stage_to($TabContainer)
|
|
|
|
func vanish():
|
|
State.save_settings()
|
|
$AnimationPlayer.play("vanish")
|
|
await $AnimationPlayer.animation_finished
|
|
get_parent_control().visible = false
|