1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -134,11 +134,7 @@ void TilesEditorUtils::_thread() {
Ref<Image> image = viewport->get_texture()->get_image();
// Find the index for the given pattern. TODO: optimize.
Variant args[] = { item.pattern, ImageTexture::create_from_image(image) };
const Variant *args_ptr[] = { &args[0], &args[1] };
Variant r;
Callable::CallError error;
item.callback.callp(args_ptr, 2, r, error);
item.callback.call(item.pattern, ImageTexture::create_from_image(image));
viewport->queue_free();
}