When I try to get the child nodes of FileDialog, I get an empty array. In the image you can see when I click the Remote in the scene tree there are other child nodes that are accessible individually. How can I get a list of these nodes. This is the code I use.
extends FileDialog
var default_dir = "."
var dir_picker: FileDialog
var view_port: Window
func _ready():
dir_picker=self
#"FileDialog/@VBoxContainer@10/@HBoxContainer@27/@Button@26"
$"./@ConfirmationDialog@79".always_on_top=true
$"./@ConfirmationDialog@79".visible=true
var parent=get_node(^".")
var node_list=parent.get_children()
pass
Anyway there is a parameter for get_children(include_internal=false) if the file dialogue is a scene, then it’s children for the scene are considered internal.
Thanks, that works. I am just trying to fix a bug in FileDialog where Confirmations such as Create Folder are not Modal and if you click away they hide behind the main window.
I don’t know if it is possible to trust the random names used to generate the hidden nodes.
func fix_confirmations(this: FileDialog):
var node_list=this.get_children(true)
for node in node_list:
if node.is_class("ConfirmationDialog"):
node.always_on_top=true