RhythmGame/scripts/OptionPanel.gd

29 lines
977 B
GDScript3
Raw Normal View History

2021-01-24 01:15:52 +10:30
extends VBoxContainer
func _on_btn_vsync_toggled(button_pressed: bool) -> void:
OS.set_use_vsync(button_pressed)
2021-01-24 01:15:52 +10:30
func _on_btn_wakelock_toggled(button_pressed: bool) -> void:
OS.set_keep_screen_on(button_pressed) # This is waiting on godotengine/godot#35536 to be merged to do anything in Linux :(
2021-01-24 01:15:52 +10:30
func _on_btn_language_item_selected(index: int) -> void:
GameTheme.display_language = ['n', 'tl', 'en'][index]
2021-01-24 01:15:52 +10:30
func _on_sl_volume_value_changed(value: float) -> void:
AudioServer.set_bus_volume_db(0, value)
2021-01-24 01:15:52 +10:30
2021-01-24 15:30:20 +10:30
func _on_sl_vol_music_value_changed(value: float) -> void:
AudioServer.set_bus_volume_db(1, value)
func _on_sl_vol_sfx_value_changed(value: float) -> void:
AudioServer.set_bus_volume_db(2, value)
func _on_sl_screenfilter_value_changed(value: float) -> void:
GameTheme.screen_filter_min_alpha = value
func _on_sl_SSX_value_changed(value: float) -> void:
Settings.SSX_set(value)
func _on_sl_SSY_value_changed(value: float) -> void:
Settings.SSY_set(value)