-
Notifications
You must be signed in to change notification settings - Fork 0
Setting
The setting object itself, will hold the current value and emit signals when the the value changes.
- value_changed ()
- value_changed_to (Variant _value)
- value_resetted ()
- Variant value = null
- set_value () setter
- get_value () getter
The current value the setting is currently holding.
When saving the setting this is the only thing wich is saved.
- Variant default = null
- set_default () setter
- get_default () getter
The initial value the setting has been created, used to know if the value has changed or to give a simple reset method.
Can be changed on the fly.
- bool archive = true
- set_archive () setter
- is_archivable () getter
When saving the setting resource this setting will be included in the file if enabled, if disabled the value will not be saved.
Can be usefull to make temporary settings or stuff like sv_cheats (only chads know).
- value_changed ()
Emitted when value changes.
- value_changed_to (Variant _value)
Same as value_changed but also send the value.
- value_resetted ()
Emited after the value has changed to his default state.
- void reset_value ()
Reset the current value to his default.
- bool is_default ()
Check if the current value is in his current state, will check for the type, equality and then hash.
- bool get_bool ()
Will give the current value as a bool by returning it or converting it.
- int get_int ()
Will give the current value as a int by returning it or converting it.
- float get_float ()
Will give the current value as a float by returning it or converting it.
- String get_string ()
Will give the current value as a string by returning it or converting it.
- Color get_color ()
Will give the current value as a color by returning it or converting it.
- Vector2 get_vector2 ()
Will give the current value as a vector2 by returning it or converting it.
- Vector3 get_vector3 ()
Will give the current value as a vector3 by returning it or converting it.
Wiki for automation
- Build with wiki-tool by GianptDev, version: 0.0
- Github
- Source: 'wiki\classes\Setting.json'
- Creation date: 23/04/2022 - 15:49:56
- Process time: 0.0 ms