extends Button

var vsync_on: bool = true

func _ready():
    update_vsync()

func _on_pressed():
    vsync_on = !vsync_on
    update_vsync()

func update_vsync():
    DisplayServer.window_set_vsync_mode(vsync_on)
    set_text("on" if vsync_on else "off")
