extends Button

var vsync_on: bool = false

func _ready():
    update_vsync()

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

func update_vsync():
    get_tree().get_root().get_child(0).disable_ai = vsync_on
    set_text("on" if vsync_on else "off")
