You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Use switch consistently in _notification (scene folder)
This commit is contained in:
@@ -33,13 +33,15 @@
|
||||
#include "core/config/engine.h"
|
||||
|
||||
void ReferenceRect::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_DRAW) {
|
||||
if (!is_inside_tree()) {
|
||||
return;
|
||||
}
|
||||
if (Engine::get_singleton()->is_editor_hint() || !editor_only) {
|
||||
draw_rect(Rect2(Point2(), get_size()), border_color, false, border_width);
|
||||
}
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_DRAW: {
|
||||
if (!is_inside_tree()) {
|
||||
return;
|
||||
}
|
||||
if (Engine::get_singleton()->is_editor_hint() || !editor_only) {
|
||||
draw_rect(Rect2(Point2(), get_size()), border_color, false, border_width);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user