class_name Setting extends HBoxContainer
## Base class for settings menu inputs

@export var key: StringName


func _ready() -> void:
	if not Engine.is_editor_hint():
		initialize_value(ProjectSettings.get_setting(key))


## Initialize the value of this setting from project settings.
func initialize_value(_value: Variant) -> void:
	pass  # Implemented in derived type


## Apply the set value of this setting to project settings.
func apply() -> void:
	ProjectSettings.set_setting(key, get_value())


## Get the raw value of this setting.
func get_value() -> Variant:
	# Implemented in derived type
	return null
