I am using the fileDialog to load in an image.
The file list is always empty when I show it with $FileDialog.show() ()
The user has to press the refresh button to make the files appear ( )
Is there a way to do this by code?
There is: overload _draw() of FileDialog
set_current_dir( path )
ok, can this be done with gdscript? That's c++ probably? I meant, is there a way to do this by code with gdscript..
Sry, i meant "override". Actually, it is GDScript :)
aha thx, got it with a refresh function in extends FileDialog
set_current_dir( "res://" )
Just in case anyone still wonders : the correct of displaying a FileDialog (like any popup) is to call the popup() function :
in this case, instead of $FileDialog.show(), just call $FileDialog.popup()