Improved signal handling

This commit is contained in:
2024-02-06 15:51:48 +01:00
parent 4e5b908f05
commit 4ad50e75db
13 changed files with 65 additions and 32 deletions

View File

@ -1,9 +1,7 @@
extends OptionButton
func _ready():
var viewport = get_viewport()
match viewport.scaling_3d_mode:
match Global.viewport.scaling_3d_mode:
Viewport.SCALING_3D_MODE_BILINEAR:
selected = 0
Viewport.SCALING_3D_MODE_FSR:
@ -12,12 +10,10 @@ func _ready():
selected = 2
func on_item_selected(index: int):
var viewport = get_viewport()
match index:
0:
viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
1:
viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
2:
viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2