20 lines
496 B
GDScript
20 lines
496 B
GDScript
extends OptionButton
|
|
|
|
func _ready():
|
|
match Global.viewport.scaling_3d_mode:
|
|
Viewport.SCALING_3D_MODE_BILINEAR:
|
|
selected = 0
|
|
Viewport.SCALING_3D_MODE_FSR:
|
|
selected = 1
|
|
Viewport.SCALING_3D_MODE_FSR2:
|
|
selected = 2
|
|
|
|
func on_item_selected(index: int):
|
|
match index:
|
|
0:
|
|
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
|
|
1:
|
|
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
|
|
2:
|
|
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2
|