diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-23 07:21:38 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 07:21:38 -0300 |
commit | 172f652dc0c31a9a70ad24e233e6d7abc3ee9c6d (patch) | |
tree | 0a47f5f6f93673d0a2752cf17d61d2bb51f9cdfc /scene/main/node.h | |
parent | 17b44e44b9a34e540cf48ee0a7335ecefcd0c3b7 (diff) | |
parent | 51dfa10ac7047258761d73a4f474183bdaf7d282 (diff) | |
download | redot-engine-172f652dc0c31a9a70ad24e233e6d7abc3ee9c6d.tar.gz |
Merge pull request #19888 from AndreaCatania/pry
Implemented proceses priority
Diffstat (limited to 'scene/main/node.h')
-rw-r--r-- | scene/main/node.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/main/node.h b/scene/main/node.h index 341349de79..4b8f584ba7 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -70,6 +70,11 @@ public: bool operator()(const Node *p_a, const Node *p_b) const { return p_b->is_greater_than(p_a); } }; + struct ComparatorWithPriority { + + bool operator()(const Node *p_a, const Node *p_b) const { return p_b->has_priority_higher_than(p_a) || p_b->is_greater_than(p_a); } + }; + private: struct GroupData { @@ -118,6 +123,7 @@ private: //should move all the stuff below to bits bool physics_process; bool idle_process; + int process_priority; bool physics_process_internal; bool idle_process_internal; @@ -259,6 +265,7 @@ public: bool is_a_parent_of(const Node *p_node) const; bool is_greater_than(const Node *p_node) const; + bool has_priority_higher_than(const Node *p_node) const; NodePath get_path() const; NodePath get_path_to(const Node *p_node) const; @@ -319,6 +326,8 @@ public: void set_process_internal(bool p_idle_process_internal); bool is_processing_internal() const; + void set_process_priority(int p_priority); + void set_process_input(bool p_enable); bool is_processing_input() const; |