mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix incorrect guards in VisibleOnScreenNotifier2D
Some methods used `DEBUG_ENABLED` instead of `TOOLS_ENABLED`.
This commit is contained in:
parent
6810fc05e6
commit
432b4be1c3
2 changed files with 7 additions and 2 deletions
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "visible_on_screen_notifier_2d.h"
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
#ifdef TOOLS_ENABLED
|
||||
Dictionary VisibleOnScreenNotifier2D::_edit_get_state() const {
|
||||
Dictionary state = Node2D::_edit_get_state();
|
||||
state["rect"] = rect;
|
||||
|
|
@ -46,7 +46,9 @@ void VisibleOnScreenNotifier2D::_edit_set_state(const Dictionary &p_state) {
|
|||
void VisibleOnScreenNotifier2D::_edit_set_rect(const Rect2 &p_edit_rect) {
|
||||
set_rect(p_edit_rect);
|
||||
}
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
Rect2 VisibleOnScreenNotifier2D::_edit_get_rect() const {
|
||||
return rect;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,13 +54,16 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
#ifdef DEBUG_ENABLED
|
||||
#ifdef TOOLS_ENABLED
|
||||
virtual Dictionary _edit_get_state() const override;
|
||||
virtual void _edit_set_state(const Dictionary &p_state) override;
|
||||
|
||||
virtual Vector2 _edit_get_minimum_size() const override { return Vector2(); }
|
||||
|
||||
virtual void _edit_set_rect(const Rect2 &p_edit_rect) override;
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
virtual Rect2 _edit_get_rect() const override;
|
||||
|
||||
virtual bool _edit_use_rect() const override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue