NativeDialogs icon indicating copy to clipboard operation
NativeDialogs copied to clipboard

Filter doesn't work on Windows 11 and Godot 4.3 Stable

Open luckyabsoluter opened this issue 1 year ago • 1 comments

  • NativeDialogs v2.2.1
  • Godot 4.3 Stable
var native_file_dialog := NativeFileDialog.new()

func _ready():
	native_file_dialog.file_mode = NativeFileDialog.FILE_MODE_OPEN_FILE
	native_file_dialog.add_filter("*.png, *.jpg")
	native_file_dialog.file_selected.connect(_file_selected)
	add_child(native_file_dialog)

func _on_open_button_pressed(): # my signal from Button
	native_file_dialog.show()

func _file_selected(path: String):
	print("path: ", path)

I didn't test on Windows 10.

luckyabsoluter avatar Oct 13 '24 09:10 luckyabsoluter

I realized that description is not optional.

native_file_dialog.add_filter("*.png, *.jpg")  # doesn't work
native_file_dialog.add_filter("*.png, *.jpg", "Images (*.png, *.jpg)") # work

luckyabsoluter avatar Oct 13 '24 09:10 luckyabsoluter