summaryrefslogtreecommitdiff
path: root/main/tests
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-03-26 17:23:11 +0100
committerGitHub <noreply@github.com>2020-03-26 17:23:11 +0100
commit5f1107aa30295e686be6f41cb6d17fc2cff1e036 (patch)
tree7bce4c680e6686c9d29be8b479be5b39205ce7a3 /main/tests
parenta2da99f40cf2123c0906c734a2eb01e9b65a45a2 (diff)
parentbe07f86f85ab70a48b310b42faa64e72a74ca694 (diff)
Merge pull request #37317 from akien-mga/display-server-rebased
Separate DisplayServer from OS and add multiple windows support
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/test_gui.cpp4
-rw-r--r--main/tests/test_physics.cpp3
-rw-r--r--main/tests/test_physics_2d.cpp3
-rw-r--r--main/tests/test_render.cpp3
4 files changed, 8 insertions, 5 deletions
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp
index f0b00aeeae..5ad1b2fe31 100644
--- a/main/tests/test_gui.cpp
+++ b/main/tests/test_gui.cpp
@@ -54,7 +54,7 @@
#include "scene/main/scene_tree.h"
#include "scene/3d/camera.h"
-#include "scene/main/viewport.h"
+#include "scene/main/window.h"
namespace TestGUI {
@@ -220,7 +220,7 @@ public:
richtext->add_text("faeries.\n");
richtext->pop();
richtext->add_text("In this new episode, we will attempt to ");
- richtext->push_font(richtext->get_font("mono_font", "Fonts"));
+ richtext->push_font(richtext->get_theme_font("mono_font", "Fonts"));
richtext->push_color(Color(0.7, 0.5, 1.0));
richtext->add_text("deliver something nice");
richtext->pop();
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index 4931d42674..7727af6ad1 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -36,6 +36,7 @@
#include "core/os/main_loop.h"
#include "core/os/os.h"
#include "core/print_string.h"
+#include "servers/display_server.h"
#include "servers/physics_server.h"
#include "servers/visual_server.h"
@@ -313,7 +314,7 @@ public:
camera = vs->camera_create();
RID viewport = vs->viewport_create();
- Size2i screen_size = OS::get_singleton()->get_window_size();
+ Size2i screen_size = DisplayServer::get_singleton()->window_get_size();
vs->viewport_set_size(viewport, screen_size.x, screen_size.y);
vs->viewport_attach_to_screen(viewport, Rect2(Vector2(), screen_size));
vs->viewport_set_active(viewport, true);
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 160c25f43a..4403e40b76 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -35,6 +35,7 @@
#include "core/os/os.h"
#include "core/print_string.h"
#include "scene/resources/texture.h"
+#include "servers/display_server.h"
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
@@ -354,7 +355,7 @@ public:
RID vp = vs->viewport_create();
canvas = vs->canvas_create();
- Size2i screen_size = OS::get_singleton()->get_window_size();
+ Size2i screen_size = DisplayServer::get_singleton()->window_get_size();
vs->viewport_attach_canvas(vp, canvas);
vs->viewport_set_size(vp, screen_size.x, screen_size.y);
vs->viewport_attach_to_screen(vp, Rect2(Vector2(), screen_size));
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index 62239a5cb5..0fbc5ea697 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -36,6 +36,7 @@
#include "core/os/main_loop.h"
#include "core/os/os.h"
#include "core/print_string.h"
+#include "servers/display_server.h"
#include "servers/visual_server.h"
#define OBJECT_COUNT 50
@@ -163,7 +164,7 @@ public:
// vs->camera_set_perspective( camera, 60.0,0.1, 100.0 );
viewport = vs->viewport_create();
- Size2i screen_size = OS::get_singleton()->get_window_size();
+ Size2i screen_size = DisplayServer::get_singleton()->window_get_size();
vs->viewport_set_size(viewport, screen_size.x, screen_size.y);
vs->viewport_attach_to_screen(viewport, Rect2(Vector2(), screen_size));
vs->viewport_set_active(viewport, true);