diff --git a/util/godot/classes/button.h b/util/godot/classes/button.h index 2630cc8e9..8e2ff4702 100644 --- a/util/godot/classes/button.h +++ b/util/godot/classes/button.h @@ -2,6 +2,7 @@ #define ZN_GODOT_BUTTON_H #if defined(ZN_GODOT) +#include #include #elif defined(ZN_GODOT_EXTENSION) #include @@ -12,7 +13,13 @@ namespace zylann::godot { inline void set_button_icon(Button &button, Ref icon) { #if defined(ZN_GODOT) + +#if VERSION_MAJOR == 4 && VERSION_MINOR <= 3 button.set_icon(icon); +#else + button.set_button_icon(icon); +#endif + #elif defined(ZN_GODOT_EXTENSION) button.set_button_icon(icon); #endif