class_name PauseMain extends VBoxContainer

func _ready() -> void:
  visible = false
  $HBoxContainer/ItemList.item_selected.connect(onItemSelected)

func open():
  visible = true
  $HBoxContainer/ItemList.clear()

func close():
  visible = false

func isOpen() -> bool:
  return visible

func onItemSelected(index:int) -> void:
  print("Selected item index: ", index)
