do some changes with XLib and started working on main menu
This commit is contained in:
1 parent
f320e6bd80
commit
04f8bb7c2d
17 files changed
+143
-13
No files matched your search
@@ -0,0 +1,20 @@
|
||||
extends Node
|
||||
|
||||
const ConfigPath = "user://config.tres"
|
||||
|
||||
func saveConfigs():
|
||||
var NewConfig = Config.new()
|
||||
NewConfig.username = MainGame.username
|
||||
NewConfig.language = MainGame.loadedLanguage
|
||||
|
||||
var sc = ResourceSaver.save(NewConfig, ConfigPath)
|
||||
|
||||
func loadConfig() -> Config:
|
||||
if ResourceLoader.exists(ConfigPath):
|
||||
var LoadedConfig = load(ConfigPath)
|
||||
if LoadedConfig:
|
||||
return LoadedConfig
|
||||
|
||||
return Config.new()
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://4druvilwa0gc
|
||||
@@ -0,0 +1,5 @@
|
||||
class_name Config extends Resource
|
||||
|
||||
@export var username : String
|
||||
@export var language : String
|
||||
@export var keybinds : Dictionary
|
||||
@@ -0,0 +1 @@
|
||||
uid://b8jxsghucippq
|
||||
Reference in new issue
Block a user