diff options
Diffstat (limited to 'scene/main/node.h')
-rw-r--r-- | scene/main/node.h | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/scene/main/node.h b/scene/main/node.h index 1c1b7bbd7a..61740738b0 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -31,32 +31,28 @@ #ifndef NODE_H #define NODE_H -#include "core/class_db.h" -#include "core/map.h" -#include "core/node_path.h" -#include "core/object.h" -#include "core/project_settings.h" -#include "core/script_language.h" -#include "core/typed_array.h" +#include "core/config/project_settings.h" +#include "core/object/class_db.h" +#include "core/object/script_language.h" +#include "core/string/node_path.h" +#include "core/templates/map.h" +#include "core/variant/typed_array.h" #include "scene/main/scene_tree.h" class Viewport; class SceneState; class Node : public Object { - GDCLASS(Node, Object); OBJ_CATEGORY("Nodes"); public: enum PauseMode { - PAUSE_MODE_INHERIT, PAUSE_MODE_STOP, PAUSE_MODE_PROCESS }; enum DuplicateFlags { - DUPLICATE_SIGNALS = 1, DUPLICATE_GROUPS = 2, DUPLICATE_SCRIPTS = 4, @@ -67,12 +63,10 @@ public: }; struct Comparator { - 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->data.process_priority == p_a->data.process_priority ? p_b->is_greater_than(p_a) : p_b->data.process_priority > p_a->data.process_priority; } }; @@ -80,7 +74,6 @@ public: private: struct GroupData { - bool persistent; SceneTree::Group *group; GroupData() { persistent = false; } @@ -92,7 +85,6 @@ private: }; struct Data { - String filename; Ref<SceneState> instance_state; Ref<SceneState> inherited_state; @@ -224,7 +216,6 @@ protected: public: enum { - // you can make your own, but don't use the same numbers as other notifications in other nodes NOTIFICATION_ENTER_TREE = 10, NOTIFICATION_EXIT_TREE = 11, @@ -248,8 +239,8 @@ public: NOTIFICATION_WM_MOUSE_ENTER = 1002, NOTIFICATION_WM_MOUSE_EXIT = 1003, - NOTIFICATION_WM_FOCUS_IN = 1004, - NOTIFICATION_WM_FOCUS_OUT = 1005, + NOTIFICATION_WM_WINDOW_FOCUS_IN = 1004, + NOTIFICATION_WM_WINDOW_FOCUS_OUT = 1005, NOTIFICATION_WM_CLOSE_REQUEST = 1006, NOTIFICATION_WM_GO_BACK_REQUEST = 1007, NOTIFICATION_WM_SIZE_CHANGED = 1008, @@ -260,8 +251,10 @@ public: NOTIFICATION_WM_ABOUT = MainLoop::NOTIFICATION_WM_ABOUT, NOTIFICATION_CRASH = MainLoop::NOTIFICATION_CRASH, NOTIFICATION_OS_IME_UPDATE = MainLoop::NOTIFICATION_OS_IME_UPDATE, - NOTIFICATION_APP_RESUMED = MainLoop::NOTIFICATION_APP_RESUMED, - NOTIFICATION_APP_PAUSED = MainLoop::NOTIFICATION_APP_PAUSED + NOTIFICATION_APPLICATION_RESUMED = MainLoop::NOTIFICATION_APPLICATION_RESUMED, + NOTIFICATION_APPLICATION_PAUSED = MainLoop::NOTIFICATION_APPLICATION_PAUSED, + NOTIFICATION_APPLICATION_FOCUS_IN = MainLoop::NOTIFICATION_APPLICATION_FOCUS_IN, + NOTIFICATION_APPLICATION_FOCUS_OUT = MainLoop::NOTIFICATION_APPLICATION_FOCUS_OUT }; @@ -271,7 +264,7 @@ public: void set_name(const String &p_name); void add_child(Node *p_child, bool p_legible_unique_name = false); - void add_child_below_node(Node *p_node, Node *p_child, bool p_legible_unique_name = false); + void add_sibling(Node *p_sibling, bool p_legible_unique_name = false); void remove_child(Node *p_child); int get_child_count() const; @@ -305,7 +298,6 @@ public: bool is_in_group(const StringName &p_identifier) const; struct GroupInfo { - StringName name; bool persistent; }; @@ -416,7 +408,7 @@ public: bool is_owned_by_parent() const; - void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const; + void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override; void clear_internal_tree_resource_paths(); |