|
|
@ -2,6 +2,10 @@ class_name SettingsMenu |
|
|
|
extends Panel |
|
|
|
|
|
|
|
|
|
|
|
@export_group("Game Option Nodes") |
|
|
|
@export var block_highlight_input: CheckButton |
|
|
|
@export var waila_input: CheckButton |
|
|
|
|
|
|
|
@export_group("Graphics Settings Nodes") |
|
|
|
@export var resolution_input: OptionButton |
|
|
|
@export var fullscreen_input: CheckBox |
|
|
@ -10,6 +14,27 @@ extends Panel |
|
|
|
@export var fov_value_label: Label |
|
|
|
|
|
|
|
|
|
|
|
func _ready() -> void: |
|
|
|
apply_default_values() |
|
|
|
|
|
|
|
|
|
|
|
func apply_default_values() -> void: |
|
|
|
#region Game Options |
|
|
|
block_highlight_input.set_pressed_no_signal(GameSettingsManager.settings.game_options.enable_block_highlight) |
|
|
|
waila_input.set_pressed_no_signal(GameSettingsManager.settings.game_options.enable_waila) |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region Graphics Settings |
|
|
|
# Changing the FOV value should trigger the value_changed signal which should update the camera and label automatically |
|
|
|
fov_slider.value = GameSettingsManager.settings.graphics.fov |
|
|
|
fullscreen_input.set_pressed_no_signal(GameSettingsManager.settings.graphics.fullscreen) |
|
|
|
vsync_input.set_pressed_no_signal(GameSettingsManager.settings.graphics.vsync) |
|
|
|
|
|
|
|
var current_resolution_index: int = resolution_input.get_item_index(GameSettingsManager.settings.graphics.resolution_id) |
|
|
|
resolution_input.select(current_resolution_index) |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region Game Settings |
|
|
|
func _on_block_highlighting_toggled(toggled_on: bool) -> void: |
|
|
|
GameSettingsManager.game_options_block_highlight_changed.emit(toggled_on) |
|
|
|