add vsync option
This commit is contained in:
parent
645370fd4f
commit
cde61d144f
4 changed files with 53 additions and 12 deletions
|
|
@ -8,6 +8,7 @@ func _ready() -> void:
|
|||
$ShadowsOption.select(GlobalVariables.shadows)
|
||||
$FOVSlider.value = GlobalVariables.FOV
|
||||
$FOVSlider/CurrentLabel.text = str(int(GlobalVariables.FOV))
|
||||
$VSyncOption.select(GlobalVariables.vsync)
|
||||
|
||||
func _on_tab_bar_tab_changed(tab: int) -> void:
|
||||
if (thisTab == tab):
|
||||
|
|
@ -39,3 +40,9 @@ func _on_shadows_option_item_selected(index: int) -> void:
|
|||
GlobalVariables.shadows = index
|
||||
get_tree().set_group("lights", "shadow_enabled", index == 1)
|
||||
GlobalVariables.updateConfig()
|
||||
|
||||
|
||||
func _on_v_sync_option_item_selected(index: int) -> void:
|
||||
GlobalVariables.vsync = index
|
||||
DisplayServer.window_set_vsync_mode(index as DisplayServer.VSyncMode)
|
||||
GlobalVariables.updateConfig()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue