1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add vararg call() method to C++ Callable

This commit is contained in:
kobewi
2023-07-11 16:18:10 +02:00
parent c7ed5d795e
commit 09b30be86d
27 changed files with 96 additions and 332 deletions

View File

@@ -256,11 +256,7 @@
ds->window_resize(window_id, wd.size.width, wd.size.height);
if (!wd.rect_changed_callback.is_null()) {
Variant size = Rect2i(ds->window_get_position(window_id), ds->window_get_size(window_id));
Variant *sizep = &size;
Variant ret;
Callable::CallError ce;
wd.rect_changed_callback.callp((const Variant **)&sizep, 1, ret, ce);
wd.rect_changed_callback.call(Rect2i(ds->window_get_position(window_id), ds->window_get_size(window_id)));
}
}
@@ -283,11 +279,7 @@
ds->release_pressed_events();
if (!wd.rect_changed_callback.is_null()) {
Variant size = Rect2i(ds->window_get_position(window_id), ds->window_get_size(window_id));
Variant *sizep = &size;
Variant ret;
Callable::CallError ce;
wd.rect_changed_callback.callp((const Variant **)&sizep, 1, ret, ce);
wd.rect_changed_callback.call(Rect2i(ds->window_get_position(window_id), ds->window_get_size(window_id)));
}
}