fabapp/godot/main.gd

19 lines
480 B
GDScript

extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
$FileDialog.mode = FileDialog.FILE_MODE_OPEN_FILE
$FileDialog.access = FileDialog.ACCESS_FILESYSTEM
$FileDialog.use_native_dialog = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_button_pressed():
$FileDialog.show()
print("button pressed")
func _on_file_dialog_file_selected(path):
Global.load_db(path)