diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-01-23 21:44:03 +0100 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-01-29 21:29:39 +0100 |
commit | 7de1b1a40dc73d0437a3891ded5348417dd64e66 (patch) | |
tree | 87e3d42755bdb930ca25a6169b111220768db544 /tests/scene | |
parent | 4fa6edc888cfacd5346bf08afa14b5f5a9bd6d0c (diff) |
[unittests] Send Mouse events via DisplayServer instead of push_input
Currently Unittests simplify mouse-events by just pushing them to Viewports.
For dealing with mouse-screen-coordinates (caused by the introduction of
multiple native Windows) it becomes necessary to extend the
DisplayServer functionality for unittests.
This PR introduces DisplayServerMock based on DisplayServerHeadless,
which additionally supports basic Mouse-Input handling.
Diffstat (limited to 'tests/scene')
-rw-r--r-- | tests/scene/test_text_edit.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h index 944f9cb9f6..f2663b037d 100644 --- a/tests/scene/test_text_edit.h +++ b/tests/scene/test_text_edit.h @@ -3271,6 +3271,7 @@ TEST_CASE("[SceneTree][TextEdit] mouse") { TEST_CASE("[SceneTree][TextEdit] caret") { TextEdit *text_edit = memnew(TextEdit); + text_edit->set_context_menu_enabled(false); // Prohibit sending InputEvents to the context menu. SceneTree::get_singleton()->get_root()->add_child(text_edit); text_edit->set_size(Size2(800, 200)); |