Initial Commit
This commit is contained in:
commit
48a5e71e00
1136 changed files with 64347 additions and 0 deletions
23
lib/globals.gd
Normal file
23
lib/globals.gd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
extends Node
|
||||
|
||||
var twitcher: TwitcherExtended
|
||||
var context: OverlayContext
|
||||
var settings: OverlaySettings
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
context = OverlayContext.new()
|
||||
context.setup()
|
||||
|
||||
context.open_db("user://overlay.db")
|
||||
context.ensure_tables()
|
||||
if FileAccess.file_exists("user://settings.tres"):
|
||||
settings = load("user://settings.tres")
|
||||
else:
|
||||
settings = OverlaySettings.new()
|
||||
|
||||
func _exit_tree() -> void:
|
||||
save_settings()
|
||||
|
||||
func save_settings() -> void:
|
||||
ResourceSaver.save(settings, "user://settings.tres")
|
||||
Loading…
Add table
Add a link
Reference in a new issue