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

Expose dialog parent-and-popup logic to the API

This commit is contained in:
Yuri Sizov
2023-04-20 15:13:21 +02:00
parent 5c653c27cd
commit 17f492fb82
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);