aboutsummaryrefslogtreecommitdiff
path: root/scene/main/node.h
diff options
context:
space:
mode:
authorJuan Linietsky2017-01-10 18:02:19 -0300
committerJuan Linietsky2017-01-10 18:04:33 -0300
commitf3f4a11cfb9767e1d691aec431dd2f1a87a31977 (patch)
tree7918ff8c7b366df911374c93d5077d27d788f9c3 /scene/main/node.h
parent6eeb994a7bbd3cb1500c42af8f3ac1227f323ce4 (diff)
downloadgodot-f3f4a11c.tar.gz
godot-f3f4a11c.tar.zst
godot-f3f4a11c.zip
- _ready() callback only happens once now, if you want to receive it again, use request_ready()
- C++ Nodes mostly do an internal process callback, so it does not conflict with users willing to use their own process callbacks - callbacks such as _input, _process, _fixed_process _unhandled_input, _unhandled_key_input do not requiere calling a function to enable them. They are enabled automatically if found on the script.
Diffstat (limited to 'scene/main/node.h')
-rw-r--r--scene/main/node.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/scene/main/node.h b/scene/main/node.h
index f9d334629..e27404d46 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -103,7 +103,8 @@ private:
StringName name;
SceneTree *tree;
bool inside_tree;
- bool ready_notified;
+ bool ready_notified; //this is a small hack, so if a node is added during _ready() to the tree, it corretly gets the _ready() notification
+ bool ready_first;
#ifdef TOOLS_ENABLED
NodePath import_path; //path used when imported, used by scene editors to keep tracking
#endif
@@ -129,6 +130,9 @@ private:
bool fixed_process;
bool idle_process;
+ bool fixed_process_internal;
+ bool idle_process_internal;
+
bool input;
bool unhandled_input;
bool unhandled_key_input;
@@ -223,6 +227,9 @@ public:
NOTIFICATION_DRAG_END=22,
NOTIFICATION_PATH_CHANGED=23,
NOTIFICATION_TRANSLATION_CHANGED=24,
+ NOTIFICATION_INTERNAL_PROCESS = 25,
+ NOTIFICATION_INTERNAL_FIXED_PROCESS = 26,
+
};
/* NODE/TREE */
@@ -302,6 +309,11 @@ public:
float get_process_delta_time() const;
bool is_processing() const;
+ void set_fixed_process_internal(bool p_process);
+ bool is_fixed_processing_internal() const;
+
+ void set_process_internal(bool p_process);
+ bool is_processing_internal() const;
void set_process_input(bool p_enable);
bool is_processing_input() const;
@@ -337,6 +349,8 @@ public:
PauseMode get_pause_mode() const;
bool can_process() const;
+ void request_ready();
+
static void print_stray_nodes();
#ifdef TOOLS_ENABLED