Merge pull request #103373 from YeldhamDev/build_remove_physics
Allow to compile templates without physics servers
This commit is contained in:
commit
e8bc75f056
72 changed files with 951 additions and 364 deletions
|
|
@ -54,7 +54,9 @@ static inline Array reverse_nested(Array array) {
|
|||
}
|
||||
|
||||
TEST_CASE("[SceneTree][TextEdit] text entry") {
|
||||
#if !defined(PHYSICS_2D_DISABLED) || !defined(PHYSICS_3D_DISABLED)
|
||||
SceneTree::get_singleton()->get_root()->set_physics_object_picking(false);
|
||||
#endif // !defined(PHYSICS_2D_DISABLED) || !defined(PHYSICS_3D_DISABLED)
|
||||
TextEdit *text_edit = memnew(TextEdit);
|
||||
SceneTree::get_singleton()->get_root()->add_child(text_edit);
|
||||
text_edit->grab_focus();
|
||||
|
|
|
|||
|
|
@ -30,14 +30,18 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "scene/2d/physics/area_2d.h"
|
||||
#include "scene/2d/physics/collision_shape_2d.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/subviewport_container.h"
|
||||
#include "scene/main/canvas_layer.h"
|
||||
#include "scene/main/window.h"
|
||||
|
||||
#ifndef PHYSICS_2D_DISABLED
|
||||
#include "scene/2d/physics/area_2d.h"
|
||||
#include "scene/2d/physics/collision_shape_2d.h"
|
||||
#include "scene/resources/2d/rectangle_shape_2d.h"
|
||||
#include "servers/physics_server_2d_dummy.h"
|
||||
#endif // PHYSICS_2D_DISABLED
|
||||
|
||||
#include "tests/test_macros.h"
|
||||
|
||||
|
|
@ -1510,6 +1514,7 @@ TEST_CASE("[SceneTree][Viewport] Control mouse cursor shape") {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef PHYSICS_2D_DISABLED
|
||||
class TestArea2D : public Area2D {
|
||||
GDCLASS(TestArea2D, Area2D);
|
||||
|
||||
|
|
@ -1910,6 +1915,7 @@ TEST_CASE("[SceneTree][Viewport] Physics Picking 2D") {
|
|||
memdelete(E.a);
|
||||
}
|
||||
}
|
||||
#endif // PHYSICS_2D_DISABLED
|
||||
|
||||
TEST_CASE("[SceneTree][Viewport] Embedded Windows") {
|
||||
Window *root = SceneTree::get_singleton()->get_root();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue