extends OptionButton


func _ready():
	add_items()
	
onready var drop_down_menu = $"."

func add_items():
	drop_down_menu.add_item("VSync")
	drop_down_menu.add_item("30")

func _on_OptionButton_item_selected(index):
	var current_selected = index
	if current_selected == 0:
		OS.vsync_enabled = true
		Engine.set_target_fps(60)
	if current_selected == 1:
		OS.vsync_enabled = false
		Engine.set_target_fps(30)
#	if current_selected == 2:
#		OS.set_window_size(Vector2(1024,768))
#	if current_selected == 3:
#		OS.set_window_size(Vector2(1280,720))
#	if current_selected == 4:
#		OS.set_window_size(Vector2(1280,800))
#	if current_selected == 5:
#		OS.set_window_size(Vector2(1280,1024))
#	if current_selected == 6:
#		OS.set_window_size(Vector2(1366,768))
#	if current_selected == 7:
#		OS.set_window_size(Vector2(1440,900))
#	if current_selected == 8:
#		OS.set_window_size(Vector2(1600,900))
#	if current_selected == 9:
#		OS.set_window_size(Vector2(1600,1200))
#	if current_selected == 10:
#		OS.set_window_size(Vector2(1920,1080))
#	if current_selected == 11:
#		OS.set_window_size(Vector2(1920,1200))
#	if current_selected == 12:
#		OS.set_window_size(Vector2(2560,1440))
#	if current_selected == 13:
#		OS.set_window_size(Vector2(2560,1600))
#	if current_selected == 14:
#		OS.vsync_enabled = false
#		Engine.max_fps = 120
