fix for BitmapFont::create_from_fnt to allow loading from file in

project root directory.
This commit is contained in:
Ibrahn Sahir 2017-12-19 10:36:03 +00:00
parent b068961c8f
commit 8981924fbe
1 changed files with 2 additions and 2 deletions

View File

@ -257,8 +257,8 @@ Error BitmapFont::create_from_fnt(const String &p_file) {
if (keys.has("file")) { if (keys.has("file")) {
String file = keys["file"]; String base_dir = p_file.get_base_dir();
file = p_file.get_base_dir() + "/" + file; String file = base_dir.plus_file(keys["file"]);
Ref<Texture> tex = ResourceLoader::load(file); Ref<Texture> tex = ResourceLoader::load(file);
if (tex.is_null()) { if (tex.is_null()) {
ERR_PRINT("Can't load font texture!"); ERR_PRINT("Can't load font texture!");