1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #76025 from YuriSizov/editor-reparentable-windows

Expose dialog parent-and-popup logic to the API
This commit is contained in:
Rémi Verschelde
2023-05-16 10:49:09 +02:00
12 changed files with 242 additions and 82 deletions

View File

@@ -1735,6 +1735,15 @@ Window *Node::get_window() const {
return nullptr;
}
Window *Node::get_last_exclusive_window() const {
Window *w = get_window();
while (w && w->get_exclusive_child()) {
w = w->get_exclusive_child();
}
return w;
}
bool Node::is_ancestor_of(const Node *p_node) const {
ERR_FAIL_NULL_V(p_node, false);
Node *p = p_node->data.parent;
@@ -3297,6 +3306,7 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_physics_processing_internal"), &Node::is_physics_processing_internal);
ClassDB::bind_method(D_METHOD("get_window"), &Node::get_window);
ClassDB::bind_method(D_METHOD("get_last_exclusive_window"), &Node::get_last_exclusive_window);
ClassDB::bind_method(D_METHOD("get_tree"), &Node::get_tree);
ClassDB::bind_method(D_METHOD("create_tween"), &Node::create_tween);