From f550af9da7a18f81ea19ed01dddb23058e54d5bf Mon Sep 17 00:00:00 2001 From: totlmstr Date: Sat, 8 Aug 2020 14:03:14 -0700 Subject: [PATCH] Add missing #ifdef SVG_ENABLED --- editor/editor_themes.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index e65e4d8deea..b73e54e8e20 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -35,7 +35,10 @@ #include "editor_icons.gen.h" #include "editor_scale.h" #include "editor_settings.h" + +#ifdef SVG_ENABLED #include "modules/svg/image_loader_svg.h" +#endif static Ref make_stylebox(Ref p_texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) { Ref style(memnew(StyleBoxTexture)); @@ -81,7 +84,8 @@ static Ref make_line_stylebox(Color p_color, int p_thickness = 1, return style; } -Ref editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, bool p_force_filter = false) { +#ifdef SVG_ENABLED +static Ref editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, bool p_force_filter = false) { Ref icon = memnew(ImageTexture); Ref img = memnew(Image); @@ -102,6 +106,7 @@ Ref editor_generate_icon(int p_index, bool p_convert_color, float return icon; } +#endif #ifndef ADD_CONVERT_COLOR #define ADD_CONVERT_COLOR(dictionary, old_color, new_color) dictionary[Color::html(old_color)] = Color::html(new_color)