1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #29815 from NilsIrl/plus_file_1

Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
Rémi Verschelde
2019-07-01 12:06:35 +02:00
committed by GitHub
17 changed files with 39 additions and 39 deletions

View File

@@ -1334,7 +1334,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
end = bbcode.length();
String image = bbcode.substr(brk_end + 1, end - brk_end - 1);
Ref<Texture> texture = ResourceLoader::load(base_path + "/" + image, "Texture");
Ref<Texture> texture = ResourceLoader::load(base_path.plus_file(image), "Texture");
if (texture.is_valid())
p_rt->add_image(texture);
@@ -1390,7 +1390,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
String fnt = tag.substr(5, tag.length());
Ref<Font> font = ResourceLoader::load(base_path + "/" + fnt, "Font");
Ref<Font> font = ResourceLoader::load(base_path.plus_file(fnt), "Font");
if (font.is_valid())
p_rt->push_font(font);
else {