Added a settings menu

This commit is contained in:
2024-02-05 23:42:04 +01:00
parent 08292dc20a
commit 81670e7df5
11 changed files with 215 additions and 45 deletions

View File

@ -0,0 +1,20 @@
extends OptionButton
var fsrQuality: Array[float] = [0.50, 0.59, 0.67, 0.77, 1.0]
func _ready():
var viewport_scale := get_viewport().scaling_3d_scale
var closest := -1
var closest_diff := 999.0
for index in range(item_count):
var diff: float = abs(viewport_scale - fsrQuality[index])
if diff < closest_diff:
closest = index
closest_diff = diff
selected = closest
func on_item_selected(index):
get_viewport().scaling_3d_scale = fsrQuality[index]