mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
commit
d17eac735c
17 changed files with 39 additions and 39 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue