From 34a0493ee77c74713a345ac045e570c863a72448 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 20 Mar 2024 11:35:13 +0100 Subject: [PATCH] feat: added GDSIGNAL macro --- godot_macros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/godot_macros.h b/godot_macros.h index 20dc441..2983803 100644 --- a/godot_macros.h +++ b/godot_macros.h @@ -29,6 +29,9 @@ #define GDFUNCTION_STATIC_ARGS(_FnName, ...) \ ClassDB::bind_static_method(MACRO_STRING(CLASSNAME), D_METHOD(#_FnName, __VA_ARGS__), &CLASSNAME::_FnName) +#define GDSIGNAL(...)\ + ClassDB::add_signal(MACRO_STRING(CLASSNAME), MethodInfo(__VA_ARGS__)) + #define GDRESOURCETYPE(_Class) vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, #_Class) #define GDEDITORONLY() if(!Engine::get_singleton()->is_editor_hint()) return;