summaryrefslogtreecommitdiff
path: root/main/tests
diff options
context:
space:
mode:
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);