I've made the UI for display settings. I was able to code fullscreen and borderless, but I don't how to code window resize.

When the button of window resize is pressed, it will change the size, from low to high.

DisplaySettings.gd

extends Control

onready var fullscreen := $CenterContainer/PanelContainer/VBoxContainer/FullScreen
onready var borderless := $CenterContainer/PanelContainer/VBoxContainer/Borderless
onready var windowed := $CenterContainer/PanelContainer/VBoxContainer/Windowed

func refocus() -> void:
	pass

func _on_FullScreen_toggle(button_pressed) -> void:
	OS.window_fullscreen = !OS.window_fullscreen
	borderless.check_box.disabled = !borderless.check_box.disabled

func _on_Borderless_toggle(button_pressed) -> void:
	if OS.window_fullscreen == false:
		OS.window_borderless = !OS.window_borderless

func _on_Windowed_toggle(button_pressed) -> void:
	pass # Replace with function body.
OS.set_window_size(Vector2(1280, 720))

What about multiple sizes? I want to give players multiple sizes to choose from.

640 X 360 (Minimum and what I've start with) 960 X 540 1280 X 720 1600 X 900 1920 X 1080 (Maximum)

So each press will increase the window size.

Yes. You can make a function that passes in a Vector2 (or just 2 numbers) and then calls the line like I showed.

9 months later