-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
This commit is contained in:
Juan Linietsky 2017-01-05 09:16:00 -03:00
parent 9e477babb3
commit 0f7af4ea51
109 changed files with 847 additions and 789 deletions

View file

@ -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)+"'";