diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 6c2928c65c..af5d0e2f45 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -33,8 +33,13 @@ #include "core/math/math_defs.h" #include "core/os/keyboard.h" #include "core/os/os.h" -#include "modules/regex/regex.h" #include "scene/scene_string_names.h" + +#include "modules/modules_enabled.gen.h" +#ifdef MODULE_REGEX_ENABLED +#include "modules/regex/regex.h" +#endif + #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" #endif @@ -2864,6 +2869,7 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi Vector<String> values = parts[1].split(",", false); +#ifdef MODULE_REGEX_ENABLED RegEx color = RegEx(); color.compile("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"); RegEx nodepath = RegEx(); @@ -2897,6 +2903,7 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi a.append(values[j]); } } +#endif if (values.size() > 1) { d[key] = a; |