mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #916 from quabug/commit
Add move_child_notify method in Node class
This commit is contained in:
commit
9df8d5f616
@ -271,6 +271,7 @@ void Node::move_child(Node *p_child,int p_pos) {
|
|||||||
data.children[i]->data.pos=i;
|
data.children[i]->data.pos=i;
|
||||||
}
|
}
|
||||||
// notification second
|
// notification second
|
||||||
|
move_child_notify(p_child);
|
||||||
for (int i=0;i<data.children.size();i++) {
|
for (int i=0;i<data.children.size();i++) {
|
||||||
data.children[i]->notification( NOTIFICATION_MOVED_IN_PARENT );
|
data.children[i]->notification( NOTIFICATION_MOVED_IN_PARENT );
|
||||||
|
|
||||||
@ -310,6 +311,11 @@ void Node::remove_child_notify(Node *p_child) {
|
|||||||
// to be used when not wanted
|
// to be used when not wanted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Node::move_child_notify(Node *p_child) {
|
||||||
|
|
||||||
|
// to be used when not wanted
|
||||||
|
}
|
||||||
|
|
||||||
void Node::set_fixed_process(bool p_process) {
|
void Node::set_fixed_process(bool p_process) {
|
||||||
|
|
||||||
if (data.fixed_process==p_process)
|
if (data.fixed_process==p_process)
|
||||||
|
@ -142,6 +142,7 @@ protected:
|
|||||||
|
|
||||||
virtual void add_child_notify(Node *p_child);
|
virtual void add_child_notify(Node *p_child);
|
||||||
virtual void remove_child_notify(Node *p_child);
|
virtual void remove_child_notify(Node *p_child);
|
||||||
|
virtual void move_child_notify(Node *p_child);
|
||||||
void remove_and_delete_child(Node *p_child);
|
void remove_and_delete_child(Node *p_child);
|
||||||
|
|
||||||
void _propagate_replace_owner(Node *p_owner,Node* p_by_owner);
|
void _propagate_replace_owner(Node *p_owner,Node* p_by_owner);
|
||||||
|
Loading…
Reference in New Issue
Block a user