summaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 3f66326b41..080563f375 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -79,7 +79,7 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
Ref<InputEvent> shortcut = arr[i + 1];
Ref<Shortcut> sc;
- sc.instance();
+ sc.instantiate();
sc->set_shortcut(shortcut);
add_shortcut(name, sc);
}
@@ -240,19 +240,19 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
}
for (Set<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) {
- int pinfo = 0;
+ uint32_t pusage = PROPERTY_USAGE_NONE;
if (E->get().save || !optimize_save) {
- pinfo |= PROPERTY_USAGE_STORAGE;
+ pusage |= PROPERTY_USAGE_STORAGE;
}
if (!E->get().name.begins_with("_") && !E->get().name.begins_with("projects/")) {
- pinfo |= PROPERTY_USAGE_EDITOR;
+ pusage |= PROPERTY_USAGE_EDITOR;
} else {
- pinfo |= PROPERTY_USAGE_STORAGE; //hiddens must always be saved
+ pusage |= PROPERTY_USAGE_STORAGE; //hiddens must always be saved
}
PropertyInfo pi(E->get().type, E->get().name);
- pi.usage = pinfo;
+ pi.usage = pusage;
if (hints.has(E->get().name)) {
pi = hints[E->get().name];
}
@@ -631,6 +631,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/3d/navigation/zoom_style", 0);
hints["editors/3d/navigation/zoom_style"] = PropertyInfo(Variant::INT, "editors/3d/navigation/zoom_style", PROPERTY_HINT_ENUM, "Vertical, Horizontal");
+ _initial_set("editors/3d/navigation/emulate_numpad", false);
_initial_set("editors/3d/navigation/emulate_3_button_mouse", false);
_initial_set("editors/3d/navigation/orbit_modifier", 0);
hints["editors/3d/navigation/orbit_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/orbit_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
@@ -1476,7 +1477,7 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const {
Ref<Shortcut> sc;
const Map<String, List<Ref<InputEvent>>>::Element *builtin_override = builtin_action_overrides.find(p_name);
if (builtin_override) {
- sc.instance();
+ sc.instantiate();
sc->set_shortcut(builtin_override->get().front()->get());
sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name));
}
@@ -1485,7 +1486,7 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const {
if (sc.is_null()) {
const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins().find(p_name);
if (builtin_default) {
- sc.instance();
+ sc.instantiate();
sc->set_shortcut(builtin_default.get().front()->get());
sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name));
}
@@ -1528,7 +1529,7 @@ Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
Ref<InputEventKey> ie;
if (p_keycode) {
- ie.instance();
+ ie.instantiate();
ie->set_unicode(p_keycode & KEY_CODE_MASK);
ie->set_keycode(p_keycode & KEY_CODE_MASK);
@@ -1540,7 +1541,7 @@ Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
if (!EditorSettings::get_singleton()) {
Ref<Shortcut> sc;
- sc.instance();
+ sc.instantiate();
sc->set_name(p_name);
sc->set_shortcut(ie);
sc->set_meta("original", ie);
@@ -1554,7 +1555,7 @@ Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
return sc;
}
- sc.instance();
+ sc.instantiate();
sc->set_name(p_name);
sc->set_shortcut(ie);
sc->set_meta("original", ie); //to compare against changes
@@ -1585,7 +1586,7 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr
// Check equality of each event.
for (List<Ref<InputEvent>>::Element *E = builtin_events.front(); E; E = E->next()) {
- if (!E->get()->shortcut_match(p_events[event_idx])) {
+ if (!E->get()->is_match(p_events[event_idx])) {
same_as_builtin = false;
break;
}