2023-12-04 13:13:36 +01:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
2023-12-04 22:19:23 +01:00
|
|
|
$FileDialog.mode = FileDialog.FILE_MODE_OPEN_FILE
|
2023-12-04 13:13:36 +01:00
|
|
|
$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")
|
2023-12-04 22:19:23 +01:00
|
|
|
|
|
|
|
func _on_file_dialog_file_selected(path):
|
|
|
|
Global.db = SQLite.new()
|
|
|
|
Global.db.path = path
|
|
|
|
Global.db.verbosity_level = SQLite.VERBOSE
|
|
|
|
Global.db.open_db()
|