extends Control

var locations = ["","",""]
var color = "627986ff"
var preurl = ""
var curso = ""

# Called when the node enters the scene tree for the first time.

func setNameAndColor(nombre,elcolor):
	$UnidadTitulo.text = nombre
	color = elcolor
	$UnidadTitulo.modulate = Color(color)
	#$capsula.self_modulate = Color(color)


func setFileLocation(index,location,nombre):
	locations[index] = location
	if index == 1:
		$Container/PPt1/Label.text = nombre
		$Container/PPt1/Cricle/CircleInterior.modulate = Color(color)
	elif index == 2:
		$Container/PPt2/Label.text = nombre
		$Container/PPt2/Cricle/CircleInterior.modulate = Color(color)


func _on_p_pt_1_pressed():
	print("abrir " + locations[1])
	OS.shell_open(locations[1])


func _on_p_pt_2_pressed():
	print("abrir " + locations[2])
	OS.shell_open(locations[2])
