summaryrefslogtreecommitdiff
path: root/scene/main/scene_main_loop.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-04-07 22:22:54 +0200
committerGitHub <noreply@github.com>2017-04-07 22:22:54 +0200
commitb81d5f4687a5f56c6cd5fc9b4545ff792378d3c7 (patch)
tree2fe73b9c38cd02fe4d851f5e8f5b50d2af449af1 /scene/main/scene_main_loop.h
parentfc45c1e6eb361c6ff4d5d76c39c7a34b113c7216 (diff)
parent665bf529481c0dbe9345d2473bce8f8d99ece0c5 (diff)
Merge pull request #8308 from RandomShaper/optimize-out-debug-n-non-tools
Optimize-out some debug and/or non-tools methods
Diffstat (limited to 'scene/main/scene_main_loop.h')
-rw-r--r--scene/main/scene_main_loop.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h
index 47220b9b63..dca0adc108 100644
--- a/scene/main/scene_main_loop.h
+++ b/scene/main/scene_main_loop.h
@@ -108,9 +108,13 @@ private:
bool quit_on_go_back;
uint32_t last_id;
+#ifdef TOOLS_ENABLED
bool editor_hint;
+#endif
+#ifdef DEBUG_ENABLED
bool debug_collisions_hint;
bool debug_navigation_hint;
+#endif
bool pause;
int root_lock;
@@ -354,10 +358,17 @@ public:
_FORCE_INLINE_ float get_fixed_process_time() const { return fixed_process_time; }
_FORCE_INLINE_ float get_idle_process_time() const { return idle_process_time; }
+#ifdef TOOLS_ENABLED
void set_editor_hint(bool p_enabled);
- bool is_editor_hint() const;
+ bool is_editor_hint() const;
bool is_node_being_edited(const Node *p_node) const;
+#else
+ void set_editor_hint(bool p_enabled) {}
+
+ bool is_editor_hint() const { return false; }
+ bool is_node_being_edited(const Node *p_node) const { return false; }
+#endif
void set_pause(bool p_enabled);
bool is_paused() const;
@@ -365,11 +376,19 @@ public:
void set_camera(const RID &p_camera);
RID get_camera() const;
+#ifdef DEBUG_ENABLED
void set_debug_collisions_hint(bool p_enabled);
bool is_debugging_collisions_hint() const;
void set_debug_navigation_hint(bool p_enabled);
bool is_debugging_navigation_hint() const;
+#else
+ void set_debug_collisions_hint(bool p_enabled) {}
+ bool is_debugging_collisions_hint() const { return false; }
+
+ void set_debug_navigation_hint(bool p_enabled) {}
+ bool is_debugging_navigation_hint() const { return false; }
+#endif
void set_debug_collisions_color(const Color &p_color);
Color get_debug_collisions_color() const;