SettingsManager
Inherits: Resource
Get and set user settings
Description
The SettingsManager is a simple class responsible for getting and setting user-specific settings. These settings are stored in a single file at user://settings.cfg.
Properties
| Type | Name | Default |
|---|---|---|
| String | settings_file | "user://settings.cfg" |
| CustomLogger | logger |
Methods
| Returns | Signature |
|---|---|
| void | save() |
| void | reload() |
| Variant | get_value(section: String, key: String, default: Variant = null) |
| Variant | get_library_value(item: LibraryItem, key: String, default: Variant = null) |
| void | set_value(section: String, key: String, value: Variant, persist: bool = true) |
| void | set_library_value(item: LibraryItem, key: String, value: Variant, persist: bool = true) |
| void | erase_section_key(section: String, key: String, persist: bool = true) |
| void | erase_library_key(item: LibraryItem, key: String, persist: bool = true) |
Property Descriptions
settings_file
String settings_file = "user://settings.cfg"
Note
There is currently no description for this property. Please help us by contributing one!
logger
CustomLogger logger
Note
There is currently no description for this property. Please help us by contributing one!
Method Descriptions
save()
void save()
Note
There is currently no description for this method. Please help us by contributing one!
reload()
void reload()
Note
There is currently no description for this method. Please help us by contributing one!
get_value()
Variant get_value(section: String, key: String, default: Variant = null)
Note
There is currently no description for this method. Please help us by contributing one!
get_library_value()
Variant get_library_value(item: LibraryItem, key: String, default: Variant = null)
Note
There is currently no description for this method. Please help us by contributing one!
set_value()
void set_value(section: String, key: String, value: Variant, persist: bool = true)
Note
There is currently no description for this method. Please help us by contributing one!
set_library_value()
void set_library_value(item: LibraryItem, key: String, value: Variant, persist: bool = true)
Note
There is currently no description for this method. Please help us by contributing one!
erase_section_key()
void erase_section_key(section: String, key: String, persist: bool = true)
Note
There is currently no description for this method. Please help us by contributing one!
erase_library_key()
void erase_library_key(item: LibraryItem, key: String, persist: bool = true)
Note
There is currently no description for this method. Please help us by contributing one!