aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/SettingNodes/SettingHSlider.gd
blob: da9348fa8bb8103aaf6690e1586efac5f1803c8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
extends HSlider
class_name SettingHSlider

@export
var section_name : String = "Setting"

@export
var setting_name : String = "SettingHSlider"

@export
var default_value : float = 0

func load_setting(file : ConfigFile):
   value = file.get_value(section_name, setting_name, default_value)

func save_setting(file : ConfigFile):
   file.set_value(section_name, setting_name, value)

func reset_setting():
   value = default_value