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 /modules | |
parent | 9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff) |
-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 'modules')
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 20 | ||||
-rw-r--r-- | modules/gdscript/gd_script.cpp | 8 | ||||
-rw-r--r-- | modules/openssl/stream_peer_openssl.cpp | 8 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_flow_control.cpp | 8 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 14 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 12 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 2 |
9 files changed, 38 insertions, 38 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 6be47fe8aa..fbd81a61bf 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -650,7 +650,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser:: String which = arg1.get_slice("/",2); if (which!="") { List<PropertyInfo> props; - Globals::get_singleton()->get_property_list(&props); + GlobalConfig::get_singleton()->get_property_list(&props); //print_line("find singleton"); for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { @@ -662,7 +662,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser:: String name = s.get_slice("/",1); //print_line("name: "+name+", which: "+which); if (name==which) { - String script = Globals::get_singleton()->get(s); + String script = GlobalConfig::get_singleton()->get(s); if (!script.begins_with("res://")) { script="res://"+script; @@ -1151,7 +1151,7 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const //autoloads as singletons List<PropertyInfo> props; - Globals::get_singleton()->get_property_list(&props); + GlobalConfig::get_singleton()->get_property_list(&props); for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { @@ -1161,7 +1161,7 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const String name = s.get_slice("/",1); if (name==String(p_identifier)) { - String path = Globals::get_singleton()->get(s); + String path = GlobalConfig::get_singleton()->get(s); if (path.begins_with("*")) { String script =path.substr(1,path.length()); @@ -1403,7 +1403,7 @@ static void _find_identifiers(GDCompletionContext& context,int p_line,bool p_onl //autoload singletons List<PropertyInfo> props; - Globals::get_singleton()->get_property_list(&props); + GlobalConfig::get_singleton()->get_property_list(&props); for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { @@ -1411,7 +1411,7 @@ static void _find_identifiers(GDCompletionContext& context,int p_line,bool p_onl if (!s.begins_with("autoload/")) continue; String name = s.get_slice("/",1); - String path = Globals::get_singleton()->get(s); + String path = GlobalConfig::get_singleton()->get(s); if (path.begins_with("*")) { result.insert(name); } @@ -1496,7 +1496,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No if (id.type==Variant::INPUT_EVENT && String(p_method)=="is_action" && p_argidx==0) { List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); for(List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { const PropertyInfo &pi=E->get(); @@ -1764,7 +1764,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No if (p_argidx==0 && (String(p_method)=="get_node" || String(p_method)=="has_node") && ClassDB::is_parent_class(id.obj_type,"Node")) { List<PropertyInfo> props; - Globals::get_singleton()->get_property_list(&props); + GlobalConfig::get_singleton()->get_property_list(&props); for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { @@ -2794,7 +2794,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol //guess in autoloads as singletons List<PropertyInfo> props; - Globals::get_singleton()->get_property_list(&props); + GlobalConfig::get_singleton()->get_property_list(&props); for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { @@ -2804,7 +2804,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol String name = s.get_slice("/",1); if (name==String(p_symbol)) { - String path = Globals::get_singleton()->get(s); + String path = GlobalConfig::get_singleton()->get(s); if (path.begins_with("*")) { String script =path.substr(1,path.length()); diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 9c10411dcf..b205a0a890 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1493,9 +1493,9 @@ void GDScriptLanguage::init() { //populate singletons - List<Globals::Singleton> singletons; - Globals::get_singleton()->get_singletons(&singletons); - for(List<Globals::Singleton>::Element *E=singletons.front();E;E=E->next()) { + List<GlobalConfig::Singleton> singletons; + GlobalConfig::get_singleton()->get_singletons(&singletons); + for(List<GlobalConfig::Singleton>::Element *E=singletons.front();E;E=E->next()) { _add_global(E->get().name,E->get().ptr); } @@ -1940,7 +1940,7 @@ GDScriptLanguage::GDScriptLanguage() { script_frame_time=0; _debug_call_stack_pos=0; - int dmcs=GLOBAL_DEF("debug/script_max_call_stack",1024); + int dmcs=GLOBAL_DEF("debug/script/max_call_stack",1024); if (ScriptDebugger::get_singleton()) { //debugging enabled! diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp index a1d07d9116..eca13533e4 100644 --- a/modules/openssl/stream_peer_openssl.cpp +++ b/modules/openssl/stream_peer_openssl.cpp @@ -590,8 +590,8 @@ void StreamPeerOpenSSL::initialize_ssl() { SSL_load_error_strings(); // Load SSL error strings ERR_load_BIO_strings(); // Load BIO error strings OpenSSL_add_all_algorithms(); // Load all available encryption algorithms - String certs_path =GLOBAL_DEF("ssl/certificates",""); - Globals::get_singleton()->set_custom_property_info("ssl/certificates",PropertyInfo(Variant::STRING,"ssl/certificates",PROPERTY_HINT_FILE,"*.crt")); + String certs_path =GLOBAL_DEF("network/ssl/certificates",""); + GlobalConfig::get_singleton()->set_custom_property_info("network/ssl/certificates",PropertyInfo(Variant::STRING,"network/ssl/certificates",PROPERTY_HINT_FILE,"*.crt")); if (certs_path!="") { @@ -613,8 +613,8 @@ void StreamPeerOpenSSL::initialize_ssl() { print_line("Loaded certs from '"+certs_path+"': "+itos(certs.size())); } } - String config_path =GLOBAL_DEF("ssl/config",""); - Globals::get_singleton()->set_custom_property_info("ssl/config",PropertyInfo(Variant::STRING,"ssl/config",PROPERTY_HINT_FILE,"*.cnf")); + String config_path =GLOBAL_DEF("network/ssl/config",""); + GlobalConfig::get_singleton()->set_custom_property_info("network/ssl/config",PropertyInfo(Variant::STRING,"network/ssl/config",PROPERTY_HINT_FILE,"*.cnf")); if (config_path!="") { Vector<uint8_t> data = FileAccess::get_file_as_array(config_path); diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index b7fa3ac5ec..e6bf55185e 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -747,7 +747,7 @@ void VideoStreamPlaybackTheora::play() { } playing = true; - delay_compensation=Globals::get_singleton()->get("audio/video_delay_compensation_ms"); + delay_compensation=GlobalConfig::get_singleton()->get("audio/video_delay_compensation_ms"); delay_compensation/=1000.0; diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 64b949bb6f..418a42bc18 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2815,7 +2815,7 @@ VisualScriptLanguage::VisualScriptLanguage() { _debug_parse_err_node=-1; _debug_parse_err_file=""; _debug_call_stack_pos=0; - int dmcs=GLOBAL_DEF("debug/script_max_call_stack",1024); + int dmcs=GLOBAL_DEF("debug/script/max_call_stack",1024); if (ScriptDebugger::get_singleton()) { //debugging enabled! _debug_max_call_stack = dmcs; diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index 606a2f47a8..bc980d5b25 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -908,7 +908,7 @@ String VisualScriptInputFilter::get_output_sequence_port_text(int p_port) const List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); int index=1; text="No Action"; @@ -1164,7 +1164,7 @@ bool VisualScriptInputFilter::_set(const StringName& p_name, const Variant& p_va if (what=="action_name") { List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); int index=1; for(List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { @@ -1378,7 +1378,7 @@ bool VisualScriptInputFilter::_get(const StringName& p_name,Variant &r_ret) cons if (what=="action_name") { List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); int index=1; for(List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { @@ -1517,7 +1517,7 @@ void VisualScriptInputFilter::_get_property_list( List<PropertyInfo> *p_list) co actions="None"; List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); Vector<String> al; for(List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index f1424af2fe..bf2b4016c7 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -332,7 +332,7 @@ void VisualScriptFunctionCall::set_singleton(const StringName& p_path) { return; singleton=p_path; - Object *obj = Globals::get_singleton()->get_singleton_object(singleton); + Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); if (obj) { base_type=obj->get_class(); } @@ -370,7 +370,7 @@ void VisualScriptFunctionCall::_update_method_cache() { } else if (call_mode==CALL_MODE_SINGLETON) { - Object *obj = Globals::get_singleton()->get_singleton_object(singleton); + Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); if (obj) { type=obj->get_class(); script=obj->get_script(); @@ -567,11 +567,11 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo& property) const if (call_mode!=CALL_MODE_SINGLETON) { property.usage=0; } else { - List<Globals::Singleton> names; - Globals::get_singleton()->get_singletons(&names); + List<GlobalConfig::Singleton> names; + GlobalConfig::get_singleton()->get_singletons(&names); property.hint=PROPERTY_HINT_ENUM; String sl; - for (List<Globals::Singleton>::Element *E=names.front();E;E=E->next()) { + for (List<GlobalConfig::Singleton>::Element *E=names.front();E;E=E->next()) { if (sl!=String()) sl+=","; sl+=E->get().name; @@ -607,7 +607,7 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo& property) const property.hint_string=itos(get_visual_script()->get_instance_ID()); } else if (call_mode==CALL_MODE_SINGLETON) { - Object *obj = Globals::get_singleton()->get_singleton_object(singleton); + Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); if (obj) { property.hint=PROPERTY_HINT_METHOD_OF_INSTANCE; property.hint_string=itos(obj->get_instance_ID()); @@ -881,7 +881,7 @@ public: } break; case VisualScriptFunctionCall::CALL_MODE_SINGLETON: { - Object *object=Globals::get_singleton()->get_singleton_object(singleton); + Object *object=GlobalConfig::get_singleton()->get_singleton_object(singleton); if (!object) { r_error.error=Variant::CallError::CALL_ERROR_INVALID_METHOD; r_error_str="Invalid singleton name: '"+String(singleton)+"'"; diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 07d234207e..e442cd48e7 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -1933,13 +1933,13 @@ public: VisualScriptNodeInstance* VisualScriptEngineSingleton::instance(VisualScriptInstance* p_instance) { VisualScriptNodeInstanceEngineSingleton * instance = memnew(VisualScriptNodeInstanceEngineSingleton ); - instance->singleton=Globals::get_singleton()->get_singleton_object(singleton); + instance->singleton=GlobalConfig::get_singleton()->get_singleton_object(singleton); return instance; } VisualScriptEngineSingleton::TypeGuess VisualScriptEngineSingleton::guess_output_type(TypeGuess* p_inputs, int p_output) const { - Object *obj=Globals::get_singleton()->get_singleton_object(singleton); + Object *obj=GlobalConfig::get_singleton()->get_singleton_object(singleton); TypeGuess tg; tg.type=Variant::OBJECT; if (obj) { @@ -1958,11 +1958,11 @@ void VisualScriptEngineSingleton::_bind_methods() { String cc; - List<Globals::Singleton> singletons; + List<GlobalConfig::Singleton> singletons; - Globals::get_singleton()->get_singletons(&singletons); + GlobalConfig::get_singleton()->get_singletons(&singletons); - for (List<Globals::Singleton>::Element *E=singletons.front();E;E=E->next()) { + for (List<GlobalConfig::Singleton>::Element *E=singletons.front();E;E=E->next()) { if (E->get().name=="VS" || E->get().name=="PS" || E->get().name=="PS2D" || E->get().name=="AS" || E->get().name=="TS" || E->get().name=="SS" || E->get().name=="SS2D") continue; //skip these, too simple named @@ -3600,7 +3600,7 @@ void VisualScriptInputAction::_validate_property(PropertyInfo& property) const { String actions; List<PropertyInfo> pinfo; - Globals::get_singleton()->get_property_list(&pinfo); + GlobalConfig::get_singleton()->get_property_list(&pinfo); Vector<String> al; for(List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index f47e254f4b..35b215cb52 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -167,7 +167,7 @@ void VideoStreamPlaybackWebm::play() { stop(); - delay_compensation = Globals::get_singleton()->get("audio/video_delay_compensation_ms"); + delay_compensation = GlobalConfig::get_singleton()->get("audio/video_delay_compensation_ms"); delay_compensation /= 1000.0; playing = true; |