extends Control


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
func _ready():
	controls.is_gui = true
	$v/quit.connect("pressed", self, "quit_pressed")
	$v/load_game.connect("pressed", self, "load_game_pressed")
	$v/new_game.connect("pressed", self, "new_game_pressed")
	$v/edit_ai.connect("pressed", self, "edit_ai_pressed")

func quit_pressed():
	get_tree().quit()
func load_game_pressed():
	controls.is_gui = true
	hide()
#	var main = preload("res://world.tscn")
#	get_tree().change_scene_to(main)
	controls.menu.nosave = true
	controls.menu.popup()
func new_game_pressed():
	controls.is_gui = false
	var main = preload("res://world.tscn")
	get_tree().change_scene_to(main)
func edit_ai_pressed():
	var ai_graph = preload("res://ui/ai_graph.tscn")
	get_tree().change_scene_to(ai_graph)
