diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-05 09:16:00 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-05 09:16:00 -0300 |
commit | 0f7af4ea51744cda23c4d3c7481f9c332973d1d4 (patch) | |
tree | 27b8914062558b5648655ccf3db13251d217af98 /scene/resources/scene_format_text.cpp | |
parent | 9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff) | |
download | redot-engine-0f7af4ea51744cda23c4d3c7481f9c332973d1d4.tar.gz |
-Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
Diffstat (limited to 'scene/resources/scene_format_text.cpp')
-rw-r--r-- | scene/resources/scene_format_text.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index af38bdd82b..fa56f63465 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -112,7 +112,7 @@ Error ResourceInteractiveLoaderText::_parse_ext_resource(VariantParser::Stream* if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path)); + path=GlobalConfig::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path)); } @@ -172,7 +172,7 @@ Error ResourceInteractiveLoaderText::poll() { if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); + path=GlobalConfig::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); } if (remaps.has(path)) { @@ -661,7 +661,7 @@ void ResourceInteractiveLoaderText::get_dependencies(FileAccess *f,List<String> if (path.find("://")==-1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); + path=GlobalConfig::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path)); } @@ -948,9 +948,9 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const } Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); - ria->local_path=Globals::get_singleton()->localize_path(p_path); + ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); +// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->open(f); return ria; @@ -999,9 +999,9 @@ String ResourceFormatLoaderText::get_resource_type(const String &p_path) const{ } Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); - ria->local_path=Globals::get_singleton()->localize_path(p_path); + ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); +// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); String r = ria->recognize(f); return r; } @@ -1016,9 +1016,9 @@ void ResourceFormatLoaderText::get_dependencies(const String& p_path,List<String } Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); - ria->local_path=Globals::get_singleton()->localize_path(p_path); + ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); +// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->get_dependencies(f,p_dependencies,p_add_types); @@ -1033,9 +1033,9 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path,const M } Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); - ria->local_path=Globals::get_singleton()->localize_path(p_path); + ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); +// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); return ria->rename_dependencies(f,p_path,p_map); } @@ -1173,7 +1173,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re ERR_FAIL_COND_V( err, ERR_CANT_OPEN ); FileAccessRef _fref(f); - local_path = Globals::get_singleton()->localize_path(p_path); + local_path = GlobalConfig::get_singleton()->localize_path(p_path); relative_paths=p_flags&ResourceSaver::FLAG_RELATIVE_PATHS; skip_editor=p_flags&ResourceSaver::FLAG_OMIT_EDITOR_PROPERTIES; |