open SQLite from Godot

This commit is contained in:
Fabien Freling 2023-12-04 22:19:23 +01:00
parent 1959852747
commit e406e9e44c
4 changed files with 44 additions and 1 deletions

View file

@ -1,8 +1,8 @@
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
@ -13,3 +13,9 @@ func _process(delta):
func _on_button_pressed():
$FileDialog.show()
print("button pressed")
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()