diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-05 16:32:40 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-05 16:32:40 +0200 |
commit | af232e63de8194b5acf9988a746f9534da91bbfb (patch) | |
tree | e51fc41bf17006433620bb9be998047db2bd1429 | |
parent | 3b70e30e9bd004da17e1bc2b8590c6029966b7fa (diff) | |
parent | d427851013f6a2f2cd021d273f2f476902c9fdcf (diff) | |
download | redot-engine-af232e63de8194b5acf9988a746f9534da91bbfb.tar.gz |
Merge pull request #82842 from YuriSizov/gdext-icons-are-relative-maaaan
Resolve relative icon paths for GDExtensions
-rw-r--r-- | core/extension/gdextension.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index 7e280466a8..b75ccbba1d 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -937,7 +937,12 @@ Error GDExtensionResourceLoader::load_gdextension_resource(const String &p_path, List<String> keys; config->get_section_keys("icons", &keys); for (const String &key : keys) { - p_extension->class_icon_paths[key] = config->get_value("icons", key); + String icon_path = config->get_value("icons", key); + if (icon_path.is_relative_path()) { + icon_path = p_path.get_base_dir().path_join(icon_path); + } + + p_extension->class_icon_paths[key] = icon_path; } } |