summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/string/ustring.cpp2
-rw-r--r--core/string/ustring.h2
-rw-r--r--core/variant/variant_call.cpp3
-rw-r--r--doc/classes/DisplayServer.xml26
-rw-r--r--doc/classes/OS.xml6
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/Transform3D.xml8
-rw-r--r--editor/connections_dialog.cpp2
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/debugger/editor_debugger_tree.cpp2
-rw-r--r--editor/editor_command_palette.cpp2
-rw-r--r--editor/editor_inspector.cpp2
-rw-r--r--editor/groups_editor.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp6
-rw-r--r--editor/plugins/animation_state_machine_editor.h8
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp59
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
-rw-r--r--editor/plugins/theme_editor_plugin.cpp2
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp2
-rw-r--r--editor/quick_open.cpp2
-rw-r--r--editor/scene_tree_dock.cpp4
-rw-r--r--editor/scene_tree_dock.h1
-rw-r--r--editor/scene_tree_editor.cpp2
-rw-r--r--editor/settings_config_dialog.cpp4
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp2
-rw-r--r--platform/android/SCsub1
-rw-r--r--platform/android/display_server_android.cpp18
-rw-r--r--platform/android/display_server_android.h3
-rw-r--r--platform/android/plugin/godot_plugin_jni.cpp2
-rw-r--r--platform/iphone/display_server_iphone.h2
-rw-r--r--platform/iphone/display_server_iphone.mm18
-rw-r--r--platform/linuxbsd/display_server_x11.cpp18
-rw-r--r--platform/linuxbsd/display_server_x11.h2
-rw-r--r--platform/osx/display_server_osx.h2
-rw-r--r--platform/osx/display_server_osx.mm18
-rw-r--r--platform/windows/display_server_windows.cpp18
-rw-r--r--platform/windows/display_server_windows.h2
-rw-r--r--platform/windows/os_windows.cpp16
-rw-r--r--scene/animation/animation_blend_space_1d.cpp4
-rw-r--r--scene/animation/animation_blend_space_2d.cpp6
-rw-r--r--scene/animation/animation_blend_tree.cpp2
-rw-r--r--scene/gui/code_edit.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--servers/display_server.cpp11
-rw-r--r--servers/display_server.h9
-rw-r--r--tests/core/string/test_string.h2
48 files changed, 263 insertions, 58 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 93b2060155..93d75ff098 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -3080,7 +3080,7 @@ bool String::is_subsequence_of(const String &p_string) const {
return _base_is_subsequence_of(p_string, false);
}
-bool String::is_subsequence_ofi(const String &p_string) const {
+bool String::is_subsequence_ofn(const String &p_string) const {
return _base_is_subsequence_of(p_string, true);
}
diff --git a/core/string/ustring.h b/core/string/ustring.h
index 4840c236c0..16d6dc5bc3 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -285,7 +285,7 @@ public:
bool ends_with(const String &p_string) const;
bool is_enclosed_in(const String &p_string) const;
bool is_subsequence_of(const String &p_string) const;
- bool is_subsequence_ofi(const String &p_string) const;
+ bool is_subsequence_ofn(const String &p_string) const;
bool is_quoted() const;
Vector<String> bigrams() const;
float similarity(const String &p_string) const;
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 8dd48a4c28..aecc6e9a26 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1382,7 +1382,7 @@ static void _register_variant_builtin_methods() {
bind_methodv(String, begins_with, static_cast<bool (String::*)(const String &) const>(&String::begins_with), sarray("text"), varray());
bind_method(String, ends_with, sarray("text"), varray());
bind_method(String, is_subsequence_of, sarray("text"), varray());
- bind_method(String, is_subsequence_ofi, sarray("text"), varray());
+ bind_method(String, is_subsequence_ofn, sarray("text"), varray());
bind_method(String, bigrams, sarray(), varray());
bind_method(String, similarity, sarray("text"), varray());
@@ -1789,6 +1789,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform3D, scaled, sarray("scale"), varray());
bind_method(Transform3D, translated, sarray("offset"), varray());
bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
+ bind_method(Transform3D, sphere_interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, is_equal_approx, sarray("xform"), varray());
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 6e06bf454c..8be944b105 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -569,6 +569,15 @@
Returns the mode of the given window.
</description>
</method>
+ <method name="window_get_native_handle" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="handle_type" type="int" enum="DisplayServer.HandleType" />
+ <argument index="1" name="window_id" type="int" default="0" />
+ <description>
+ Returns internal structure pointers for use in plugins.
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="window_get_position" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="window_id" type="int" default="0" />
@@ -930,5 +939,22 @@
Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
</constant>
+ <constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
+ Display handle:
+ - Linux: [code]X11::Display*[/code] for the display.
+ </constant>
+ <constant name="WINDOW_HANDLE" value="1" enum="HandleType">
+ Window handle:
+ - Windows: [code]HWND[/code] for the window.
+ - Linux: [code]X11::Window*[/code] for the window.
+ - MacOS: [code]NSWindow*[/code] for the window.
+ - iOS: [code]UIViewController*[/code] for the view controller.
+ - Android: [code]jObject[/code] for the activity.
+ </constant>
+ <constant name="WINDOW_VIEW" value="2" enum="HandleType">
+ Window view:
+ - MacOS: [code]NSView*[/code] for the window main view.
+ - iOS: [code]UIView*[/code] for the window main view.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 1c44967aba..c752291588 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -54,7 +54,7 @@
<argument index="2" name="open_console" type="bool" default="false" />
<description>
Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
- On Windows, if [code]open_console[/code] is [code]true[/code] and process is console app, new terminal window will be opened, it's ignored on other platforms.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
For example, running another instance of the project:
[codeblocks]
@@ -114,7 +114,7 @@
<argument index="4" name="open_console" type="bool" default="false" />
<description>
Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too.
- On Windows, if [code]open_console[/code] is [code]true[/code] and process is console app, new terminal window will be opened, it's ignored on other platforms.
+ On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails.
[b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process.
For example, to retrieve a list of the working directory's contents:
@@ -128,7 +128,7 @@
int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, output);
[/csharp]
[/codeblocks]
- If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example:
+ If you wish to access a shell built-in or execute a composite command, a platform-specific shell can be invoked. For example:
[codeblocks]
[gdscript]
var output = []
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index c8e835f0f1..1a9b9ccdcc 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -285,7 +285,7 @@
Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
- <method name="is_subsequence_ofi" qualifiers="const">
+ <method name="is_subsequence_ofn" qualifiers="const">
<return type="bool" />
<argument index="0" name="text" type="String" />
<description>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index e679a8cfeb..ccecaaa6ac 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -106,6 +106,14 @@
Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description>
</method>
+ <method name="sphere_interpolate_with" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="xform" type="Transform3D" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" />
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index bda558bb72..5bea793da8 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -1009,7 +1009,7 @@ void ConnectionsDock::update_tree() {
PackedStringArray argnames;
String filter_text = search_box->get_text();
- if (!filter_text.is_subsequence_ofi(signal_name)) {
+ if (!filter_text.is_subsequence_ofn(signal_name)) {
continue;
}
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index d0dfbc7c11..3d55f45dd6 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -178,7 +178,7 @@ void CreateDialog::_update_search() {
// Filter all candidate results.
Vector<String> candidates;
for (List<StringName>::Element *I = type_list.front(); I; I = I->next()) {
- if (empty_search || search_text.is_subsequence_ofi(I->get())) {
+ if (empty_search || search_text.is_subsequence_ofn(I->get())) {
candidates.push_back(I->get());
}
}
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 29d0014b8a..41f4db541d 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -186,7 +186,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
// Apply filters.
while (parent) {
const bool had_siblings = item->get_prev() || item->get_next();
- if (filter.is_subsequence_ofi(item->get_text(0))) {
+ if (filter.is_subsequence_ofn(item->get_text(0))) {
break; // Filter matches, must survive.
}
parent->remove_child(item);
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index 1724e87489..d13d1a6c68 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -72,7 +72,7 @@ void EditorCommandPalette::_update_command_search(const String &search_text) {
r.shortcut_text = commands[r.key_name].shortcut;
r.last_used = commands[r.key_name].last_used;
- if (search_text.is_subsequence_ofi(r.display_name)) {
+ if (search_text.is_subsequence_ofn(r.display_name)) {
if (!search_text.is_empty()) {
r.score = _score_path(search_text, r.display_name.to_lower());
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index a3538d3381..d19032da8b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -2595,7 +2595,7 @@ void EditorInspector::update_tree() {
// Ignore properties that do not fit the filter.
if (use_filter && !filter.is_empty()) {
- if (!filter.is_subsequence_ofi(path) && !filter.is_subsequence_ofi(property_label_string) && property_prefix.to_lower().find(filter.to_lower()) == -1) {
+ if (!filter.is_subsequence_ofn(path) && !filter.is_subsequence_ofn(property_label_string) && property_prefix.to_lower().find(filter.to_lower()) == -1) {
continue;
}
}
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 15455b759b..1644bb9dbe 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -71,13 +71,13 @@ void GroupDialog::_load_nodes(Node *p_current) {
TreeItem *node = nullptr;
NodePath path = scene_tree->get_edited_scene_root()->get_path_to(p_current);
if (keep && p_current->is_in_group(selected_group)) {
- if (remove_filter->get_text().is_subsequence_ofi(String(p_current->get_name()))) {
+ if (remove_filter->get_text().is_subsequence_ofn(String(p_current->get_name()))) {
node = nodes_to_remove->create_item(remove_node_root);
keep = true;
} else {
keep = false;
}
- } else if (keep && add_filter->get_text().is_subsequence_ofi(String(p_current->get_name()))) {
+ } else if (keep && add_filter->get_text().is_subsequence_ofn(String(p_current->get_name()))) {
node = nodes_to_add->create_item(add_node_root);
keep = true;
} else {
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 94990636da..26ce6de0df 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -854,10 +854,10 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
}
to.y = from.y;
- float len = MAX(0.0001, current_length);
+ double len = MAX(0.0001, current_length);
- float pos = CLAMP(play_pos, 0, len);
- float c = pos / len;
+ double pos = CLAMP(play_pos, 0, len);
+ double c = pos / len;
Color fg = get_theme_color(SNAME("font_color"), SNAME("Label"));
Color bg = fg;
bg.a *= 0.3;
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index 8970e3e062..d948e05472 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -159,11 +159,11 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
StringName last_blend_from_node;
StringName last_current_node;
Vector<StringName> last_travel_path;
- float last_play_pos;
- float play_pos;
- float current_length;
+ double last_play_pos;
+ double play_pos;
+ double current_length;
- float error_time;
+ double error_time;
String error_text;
EditorFileDialog *open_file;
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1aae82f66f..3f7fd29e27 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -882,10 +882,39 @@ void CanvasItemEditor::_selection_menu_hide() {
}
void CanvasItemEditor::_add_node_pressed(int p_result) {
- if (p_result == AddNodeOption::ADD_NODE) {
- SceneTreeDock::get_singleton()->open_add_child_dialog();
- } else if (p_result == AddNodeOption::ADD_INSTANCE) {
- SceneTreeDock::get_singleton()->open_instance_child_dialog();
+ List<Node *> nodes_to_move;
+
+ switch (p_result) {
+ case ADD_NODE: {
+ SceneTreeDock::get_singleton()->open_add_child_dialog();
+ } break;
+ case ADD_INSTANCE: {
+ SceneTreeDock::get_singleton()->open_instance_child_dialog();
+ } break;
+ case ADD_PASTE: {
+ nodes_to_move = SceneTreeDock::get_singleton()->paste_nodes();
+ [[fallthrough]];
+ }
+ case ADD_MOVE: {
+ if (p_result == ADD_MOVE) {
+ nodes_to_move = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list();
+ }
+ if (nodes_to_move.is_empty()) {
+ return;
+ }
+
+ undo_redo->create_action(TTR("Move Node(s) to Position"));
+ for (Node *node : nodes_to_move) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(node);
+ if (ci) {
+ Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
+ undo_redo->add_do_method(ci, "_edit_set_position", xform.xform(node_create_position));
+ undo_redo->add_undo_method(ci, "_edit_set_position", ci->_edit_get_position());
+ }
+ }
+ undo_redo->commit_action();
+ _reset_create_position();
+ } break;
}
}
@@ -2194,10 +2223,26 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
}
if (b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::RIGHT) {
+ add_node_menu->clear();
+ add_node_menu->add_icon_item(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), TTR("Add Node Here"), ADD_NODE);
+ add_node_menu->add_icon_item(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instantiate Scene Here"), ADD_INSTANCE);
+ for (Node *node : SceneTreeDock::get_singleton()->get_node_clipboard()) {
+ if (Object::cast_to<CanvasItem>(node)) {
+ add_node_menu->add_icon_item(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")), TTR("Paste Node(s) Here"), ADD_PASTE);
+ break;
+ }
+ }
+ for (Node *node : EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list()) {
+ if (Object::cast_to<CanvasItem>(node)) {
+ add_node_menu->add_icon_item(get_theme_icon(SNAME("ToolMove"), SNAME("EditorIcons")), TTR("Move Node(s) Here"), ADD_MOVE);
+ break;
+ }
+ }
+
add_node_menu->reset_size();
- add_node_menu->set_position(get_screen_transform().xform(get_local_mouse_position()));
+ add_node_menu->set_position(get_screen_transform().xform(b->get_position()));
add_node_menu->popup();
- node_create_position = transform.affine_inverse().xform((get_local_mouse_position()));
+ node_create_position = transform.affine_inverse().xform(b->get_position());
return true;
}
@@ -5548,8 +5593,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
add_node_menu = memnew(PopupMenu);
add_child(add_node_menu);
- add_node_menu->add_icon_item(SceneTreeDock::get_singleton()->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), TTR("Add Node Here"));
- add_node_menu->add_icon_item(SceneTreeDock::get_singleton()->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instance Scene Here"));
add_node_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_add_node_pressed));
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), Key::KP_MULTIPLY);
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 1e8fc0670d..9fa44bfb25 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -84,6 +84,8 @@ public:
enum AddNodeOption {
ADD_NODE,
ADD_INSTANCE,
+ ADD_PASTE,
+ ADD_MOVE,
};
private:
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 2fc4cda861..f307bbd9c6 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1878,7 +1878,7 @@ void ScriptEditor::_update_members_overview() {
for (int i = 0; i < functions.size(); i++) {
String filter = filter_methods->get_text();
String name = functions[i].get_slice(":", 0);
- if (filter.is_empty() || filter.is_subsequence_ofi(name)) {
+ if (filter.is_empty() || filter.is_subsequence_ofn(name)) {
members_overview->add_item(name);
members_overview->set_item_metadata(members_overview->get_item_count() - 1, functions[i].get_slice(":", 1).to_int() - 1);
}
@@ -2128,7 +2128,7 @@ void ScriptEditor::_update_script_names() {
Vector<_ScriptEditorItemData> sedata_filtered;
for (int i = 0; i < sedata.size(); i++) {
String filter = filter_scripts->get_text();
- if (filter.is_empty() || filter.is_subsequence_ofi(sedata[i].name)) {
+ if (filter.is_empty() || filter.is_subsequence_ofn(sedata[i].name)) {
sedata_filtered.push_back(sedata[i]);
}
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index f95b2b40b5..611f81db33 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -2076,7 +2076,7 @@ void ThemeTypeDialog::_update_add_type_options(const String &p_filter) {
Vector<StringName> unique_names;
for (const StringName &E : names) {
// Filter out undesired values.
- if (!p_filter.is_subsequence_ofi(String(E))) {
+ if (!p_filter.is_subsequence_ofn(String(E))) {
continue;
}
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index 1aafab4713..4c644f33d4 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -166,8 +166,6 @@ void TilesEditorPlugin::_update_editors() {
editor_node->hide_bottom_panel();
}
}
- tileset_editor_button->set_visible(tile_set.is_valid());
- tilemap_editor_button->set_visible(tile_map);
}
void TilesEditorPlugin::_notification(int p_what) {
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index 118c016c6d..2a8ca67fe6 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -84,7 +84,7 @@ void EditorQuickOpen::_update_search() {
// Filter possible candidates.
Vector<Entry> entries;
for (int i = 0; i < files.size(); i++) {
- if (empty_search || search_text.is_subsequence_ofi(files[i])) {
+ if (empty_search || search_text.is_subsequence_ofn(files[i])) {
Entry r;
r.path = files[i];
r.score = empty_search ? 0 : _score_path(search_text, files[i].to_lower());
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 125fcc02dc..cece787bf3 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -3060,6 +3060,10 @@ List<Node *> SceneTreeDock::paste_nodes() {
return pasted_nodes;
}
+List<Node *> SceneTreeDock::get_node_clipboard() const {
+ return node_clipboard;
+}
+
void SceneTreeDock::add_remote_tree_editor(Control *p_remote) {
ERR_FAIL_COND(remote_tree != nullptr);
add_child(p_remote);
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index d73038ef36..3639e66233 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -315,6 +315,7 @@ public:
void open_instance_child_dialog();
List<Node *> paste_nodes();
+ List<Node *> get_node_clipboard() const;
ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; }
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 4a36462d65..c755bca64f 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -411,7 +411,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
item->set_as_cursor(0);
}
- bool keep = (filter.is_subsequence_ofi(String(p_node->get_name())));
+ bool keep = (filter.is_subsequence_ofn(String(p_node->get_name())));
for (int i = 0; i < p_node->get_child_count(); i++) {
bool child_keep = _add_nodes(p_node->get_child(i), item, p_scroll_to_selected);
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 71edeefd10..c4d361bd49 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -379,7 +379,7 @@ void EditorSettingsDialog::_update_shortcuts() {
// Join the text of the events with a delimiter so they can all be displayed in one cell.
String events_display_string = event_strings.is_empty() ? "None" : String("; ").join(event_strings);
- if (!shortcut_filter.is_subsequence_ofi(action_name) && (events_display_string == "None" || !shortcut_filter.is_subsequence_ofi(events_display_string))) {
+ if (!shortcut_filter.is_subsequence_ofn(action_name) && (events_display_string == "None" || !shortcut_filter.is_subsequence_ofn(events_display_string))) {
continue;
}
@@ -428,7 +428,7 @@ void EditorSettingsDialog::_update_shortcuts() {
// Shortcut Item
- if (!shortcut_filter.is_subsequence_ofi(sc->get_name())) {
+ if (!shortcut_filter.is_subsequence_ofn(sc->get_name())) {
continue;
}
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index a944844226..16a107415b 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -269,7 +269,7 @@ Array GDScriptWorkspace::symbol(const Dictionary &p_params) {
Vector<lsp::DocumentedSymbolInformation> script_symbols;
E.value->get_symbols().symbol_tree_as_list(E.key, script_symbols);
for (int i = 0; i < script_symbols.size(); ++i) {
- if (query.is_subsequence_ofi(script_symbols[i].name)) {
+ if (query.is_subsequence_ofn(script_symbols[i].name)) {
lsp::DocumentedSymbolInformation symbol = script_symbols[i];
symbol.location.uri = get_file_uri(symbol.location.uri);
arr.push_back(symbol.to_json());
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 320901787d..84510fc71e 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -889,7 +889,7 @@ void GridMapEditor::update_palette() {
name = "#" + itos(id);
}
- if (!filter.is_empty() && !filter.is_subsequence_ofi(name)) {
+ if (!filter.is_empty() && !filter.is_subsequence_ofn(name)) {
continue;
}
diff --git a/platform/android/SCsub b/platform/android/SCsub
index ecc72019e5..d031d14499 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -18,6 +18,7 @@ android_files = [
"jni_utils.cpp",
"android_keys_utils.cpp",
"display_server_android.cpp",
+ "plugin/godot_plugin_jni.cpp",
"vulkan/vulkan_context_android.cpp",
]
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index 15f61db27c..3d0dabc56e 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -253,6 +253,24 @@ DisplayServer::WindowID DisplayServerAndroid::get_window_at_screen_position(cons
return MAIN_WINDOW_ID;
}
+int64_t DisplayServerAndroid::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ ERR_FAIL_COND_V(p_window != MAIN_WINDOW_ID, 0);
+ switch (p_handle_type) {
+ case DISPLAY_HANDLE: {
+ return 0; // Not supported.
+ }
+ case WINDOW_HANDLE: {
+ return (int64_t)((OS_Android *)OS::get_singleton())->get_godot_java()->get_activity();
+ }
+ case WINDOW_VIEW: {
+ return 0; // Not supported.
+ }
+ default: {
+ return 0;
+ }
+ }
+}
+
void DisplayServerAndroid::window_attach_instance_id(ObjectID p_instance, DisplayServer::WindowID p_window) {
window_attached_instance_id = p_instance;
}
diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h
index 6aadc7e1a9..e52e07bf1a 100644
--- a/platform/android/display_server_android.h
+++ b/platform/android/display_server_android.h
@@ -124,6 +124,9 @@ public:
virtual Vector<WindowID> get_window_list() const override;
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
+
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
+
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override;
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp
index 2207eec18d..48aeb3d070 100644
--- a/platform/android/plugin/godot_plugin_jni.cpp
+++ b/platform/android/plugin/godot_plugin_jni.cpp
@@ -126,7 +126,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS
env->DeleteLocalRef(j_param);
};
- singleton->emit_signal(SNAME(signal_name), args, count);
+ singleton->emit_signal(StringName(signal_name), args, count);
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths) {
diff --git a/platform/iphone/display_server_iphone.h b/platform/iphone/display_server_iphone.h
index de04bc88e3..6434483641 100644
--- a/platform/iphone/display_server_iphone.h
+++ b/platform/iphone/display_server_iphone.h
@@ -135,6 +135,8 @@ public:
virtual WindowID
get_window_at_screen_position(const Point2i &p_position) const override;
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
+
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
diff --git a/platform/iphone/display_server_iphone.mm b/platform/iphone/display_server_iphone.mm
index 77e1a6078c..48bda89fc3 100644
--- a/platform/iphone/display_server_iphone.mm
+++ b/platform/iphone/display_server_iphone.mm
@@ -407,6 +407,24 @@ DisplayServer::WindowID DisplayServerIPhone::get_window_at_screen_position(const
return MAIN_WINDOW_ID;
}
+int64_t DisplayServerIPhone::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ ERR_FAIL_COND_V(p_window != MAIN_WINDOW_ID, 0);
+ switch (p_handle_type) {
+ case DISPLAY_HANDLE: {
+ return 0; // Not supported.
+ }
+ case WINDOW_HANDLE: {
+ return (int64_t)AppDelegate.viewController;
+ }
+ case WINDOW_VIEW: {
+ return (int64_t)AppDelegate.viewController.godotView;
+ }
+ default: {
+ return 0;
+ }
+ }
+}
+
void DisplayServerIPhone::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
window_attached_instance_id = p_instance;
}
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 0ce627ca4f..74f31bb979 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -1154,6 +1154,24 @@ void DisplayServerX11::delete_sub_window(WindowID p_id) {
windows.erase(p_id);
}
+int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ ERR_FAIL_COND_V(!windows.has(p_window), 0);
+ switch (p_handle_type) {
+ case DISPLAY_HANDLE: {
+ return (int64_t)x11_display;
+ }
+ case WINDOW_HANDLE: {
+ return (int64_t)windows[p_window].x11_window;
+ }
+ case WINDOW_VIEW: {
+ return 0; // Not supported.
+ }
+ default: {
+ return 0;
+ }
+ }
+}
+
void DisplayServerX11::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 8929f528d6..de5e872837 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -316,6 +316,8 @@ public:
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
+
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h
index d609a84e50..2b4bcc3e02 100644
--- a/platform/osx/display_server_osx.h
+++ b/platform/osx/display_server_osx.h
@@ -282,6 +282,8 @@ public:
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
+
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 1340aad9b2..744143574b 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -3526,6 +3526,24 @@ DisplayServer::WindowID DisplayServerOSX::get_window_at_screen_position(const Po
return INVALID_WINDOW_ID;
}
+int64_t DisplayServerOSX::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ ERR_FAIL_COND_V(!windows.has(p_window), 0);
+ switch (p_handle_type) {
+ case DISPLAY_HANDLE: {
+ return 0; // Not supported.
+ }
+ case WINDOW_HANDLE: {
+ return (int64_t)windows[p_window].window_object;
+ }
+ case WINDOW_VIEW: {
+ return (int64_t)windows[p_window].window_view;
+ }
+ default: {
+ return 0;
+ }
+ }
+}
+
void DisplayServerOSX::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
_THREAD_SAFE_METHOD_
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index c9e2251b35..521c87b730 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -570,6 +570,24 @@ void DisplayServerWindows::gl_window_make_current(DisplayServer::WindowID p_wind
#endif
}
+int64_t DisplayServerWindows::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ ERR_FAIL_COND_V(!windows.has(p_window), 0);
+ switch (p_handle_type) {
+ case DISPLAY_HANDLE: {
+ return 0; // Not supported.
+ }
+ case WINDOW_HANDLE: {
+ return (int64_t)windows[p_window].hWnd;
+ }
+ case WINDOW_VIEW: {
+ return 0; // Not supported.
+ }
+ default: {
+ return 0;
+ }
+ }
+}
+
void DisplayServerWindows::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
_THREAD_SAFE_METHOD_
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 3593dc1a05..803c2d4836 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -472,6 +472,8 @@ public:
virtual void show_window(WindowID p_window) override;
virtual void delete_sub_window(WindowID p_window) override;
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
+
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 06b8fea681..41ba1092db 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -385,14 +385,14 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
}
inherit_handles = true;
}
- DWORD creaton_flags = NORMAL_PRIORITY_CLASS;
+ DWORD creation_flags = NORMAL_PRIORITY_CLASS;
if (p_open_console) {
- creaton_flags |= CREATE_NEW_CONSOLE;
+ creation_flags |= CREATE_NEW_CONSOLE;
} else {
- creaton_flags |= CREATE_NO_WINDOW;
+ creation_flags |= CREATE_NO_WINDOW;
}
- int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, inherit_handles, creaton_flags, nullptr, nullptr, si_w, &pi.pi);
+ int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, inherit_handles, creation_flags, nullptr, nullptr, si_w, &pi.pi);
if (!ret && r_pipe) {
CloseHandle(pipe[0]); // Cleanup pipe handles.
CloseHandle(pipe[1]);
@@ -446,14 +446,14 @@ Error OS_Windows::create_process(const String &p_path, const List<String> &p_arg
ZeroMemory(&pi.pi, sizeof(pi.pi));
LPSTARTUPINFOW si_w = (LPSTARTUPINFOW)&pi.si;
- DWORD creaton_flags = NORMAL_PRIORITY_CLASS;
+ DWORD creation_flags = NORMAL_PRIORITY_CLASS;
if (p_open_console) {
- creaton_flags |= CREATE_NEW_CONSOLE;
+ creation_flags |= CREATE_NEW_CONSOLE;
} else {
- creaton_flags |= CREATE_NO_WINDOW;
+ creation_flags |= CREATE_NO_WINDOW;
}
- int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, creaton_flags, nullptr, nullptr, si_w, &pi.pi);
+ int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, creation_flags, nullptr, nullptr, si_w, &pi.pi);
ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + command);
ProcessID pid = pi.pi.dwProcessId;
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 33939d4cd6..849316c568 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -292,10 +292,10 @@ double AnimationNodeBlendSpace1D::process(double p_time, bool p_seek) {
// actually blend the animations now
- float max_time_remaining = 0.0;
+ double max_time_remaining = 0.0;
for (int i = 0; i < blend_points_used; i++) {
- float remaining = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, weights[i], FILTER_IGNORE, false);
+ double remaining = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, weights[i], FILTER_IGNORE, false);
max_time_remaining = MAX(max_time_remaining, remaining);
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index f169e79751..a3aa3f6cc8 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -438,7 +438,7 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) {
Vector2 blend_pos = get_parameter(blend_position);
int closest = get_parameter(this->closest);
double length_internal = get_parameter(this->length_internal);
- float mind = 0.0; //time of min distance point
+ double mind = 0.0; //time of min distance point
if (blend_mode == BLEND_MODE_INTERPOLATED) {
if (triangles.size() == 0) {
@@ -502,7 +502,7 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) {
for (int j = 0; j < 3; j++) {
if (i == triangle_points[j]) {
//blend with the given weight
- float t = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, blend_weights[j], FILTER_IGNORE, false);
+ double t = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, blend_weights[j], FILTER_IGNORE, false);
if (first || t < mind) {
mind = t;
first = false;
@@ -530,7 +530,7 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) {
}
if (new_closest != closest && new_closest != -1) {
- float from = 0.0;
+ double from = 0.0;
if (blend_mode == BLEND_MODE_DISCRETE_CARRY && closest != -1) {
//for ping-pong loop
Ref<AnimationNodeAnimation> na_c = static_cast<Ref<AnimationNodeAnimation>>(blend_points[closest].node);
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 9d37b2d6ac..3b55dd4a42 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -750,7 +750,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) {
return 0;
}
- float rem = 0.0;
+ double rem = 0.0;
if (prev < 0) { // process current animation, check for transition
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 8924c37c50..5511a1d910 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -2857,7 +2857,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
completion_options_casei.push_back(option);
} else if (s.is_subsequence_of(option.display)) {
completion_options_subseq.push_back(option);
- } else if (s.is_subsequence_ofi(option.display)) {
+ } else if (s.is_subsequence_ofn(option.display)) {
completion_options_subseq_casei.push_back(option);
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index bc386e9813..e2e53b45f4 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -4353,7 +4353,7 @@ Size2 RichTextLabel::get_minimum_size() const {
size.x += fixed_width;
}
- if (fixed_width != -1 || fit_content_height) {
+ if (fit_content_height) {
const_cast<RichTextLabel *>(this)->_validate_line_caches(main);
size.y += get_content_height();
}
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index d4ff42bc34..5ded5cf214 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -316,6 +316,11 @@ void DisplayServer::set_icon(const Ref<Image> &p_icon) {
WARN_PRINT("Icon not supported by this display server.");
}
+int64_t DisplayServer::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+ WARN_PRINT("Native handle not supported by this display server.");
+ return 0;
+}
+
void DisplayServer::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
WARN_PRINT("Changing the VSync mode is not supported by this display server.");
}
@@ -388,6 +393,8 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_sub_window", "mode", "vsync_mode", "flags", "rect"), &DisplayServer::create_sub_window, DEFVAL(Rect2i()));
ClassDB::bind_method(D_METHOD("delete_sub_window", "window_id"), &DisplayServer::delete_sub_window);
+ ClassDB::bind_method(D_METHOD("window_get_native_handle", "handle_type", "window_id"), &DisplayServer::window_get_native_handle, DEFVAL(MAIN_WINDOW_ID));
+
ClassDB::bind_method(D_METHOD("window_set_title", "title", "window_id"), &DisplayServer::window_set_title, DEFVAL(MAIN_WINDOW_ID));
ClassDB::bind_method(D_METHOD("window_set_mouse_passthrough", "region", "window_id"), &DisplayServer::window_set_mouse_passthrough, DEFVAL(MAIN_WINDOW_ID));
@@ -552,6 +559,10 @@ void DisplayServer::_bind_methods() {
BIND_ENUM_CONSTANT(VSYNC_ENABLED);
BIND_ENUM_CONSTANT(VSYNC_ADAPTIVE);
BIND_ENUM_CONSTANT(VSYNC_MAILBOX);
+
+ BIND_ENUM_CONSTANT(DISPLAY_HANDLE);
+ BIND_ENUM_CONSTANT(WINDOW_HANDLE);
+ BIND_ENUM_CONSTANT(WINDOW_VIEW);
}
void DisplayServer::register_create_function(const char *p_name, CreateFunction p_function, GetRenderingDriversFunction p_get_drivers) {
diff --git a/servers/display_server.h b/servers/display_server.h
index 0c2bc5dd3a..8c6586dc20 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -65,6 +65,12 @@ public:
VSYNC_MAILBOX
};
+ enum HandleType {
+ DISPLAY_HANDLE,
+ WINDOW_HANDLE,
+ WINDOW_VIEW,
+ };
+
typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, VSyncMode, uint32_t, const Size2i &, Error &r_error);
typedef Vector<String> (*GetRenderingDriversFunction)();
@@ -232,6 +238,8 @@ public:
virtual void show_window(WindowID p_id);
virtual void delete_sub_window(WindowID p_id);
+ virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const;
+
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const = 0;
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) = 0;
@@ -387,6 +395,7 @@ VARIANT_ENUM_CAST(DisplayServer::MouseMode)
VARIANT_ENUM_CAST(DisplayServer::ScreenOrientation)
VARIANT_ENUM_CAST(DisplayServer::WindowMode)
VARIANT_ENUM_CAST(DisplayServer::WindowFlags)
+VARIANT_ENUM_CAST(DisplayServer::HandleType)
VARIANT_ENUM_CAST(DisplayServer::CursorShape)
VARIANT_ENUM_CAST(DisplayServer::VSyncMode)
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index baab5ddfe7..e03a71bcb8 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -877,7 +877,7 @@ TEST_CASE("[String] is_subsequence_of") {
String a = "is subsequence of";
CHECK(String("sub").is_subsequence_of(a));
CHECK(!String("Sub").is_subsequence_of(a));
- CHECK(String("Sub").is_subsequence_ofi(a));
+ CHECK(String("Sub").is_subsequence_ofn(a));
}
TEST_CASE("[String] match") {