Repository: godotengine/godot
File: editor/inspector/editor_properties.cpp (C++)

Code before:
	EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);
	Vector<String> options;
	Vector<String> builtin_options;
	List<PropertyInfo> pinfo;
	ProjectSettings::get_singleton()->get_property_list(&pinfo);
	Vector<String> hints = p_hint_text.remove_char(' ').split(",", false);

	HashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins();
	bool show_builtin = hints.has("show_builtin");

	for (const PropertyInfo &pi : pinfo) {
		if (!pi.name.begins_with("input/")) {
			continue;
		}

		const String action_name = pi.name.get_slicec('/', 1);
		if (builtins.has(action_name)) {
			if (show_builtin) {
				builtin_options.append(action_name);
			}
		} else {
			options.append(action_name);
		}
	}
	options.append_array(builtin_options);
	editor->setup(options, {}, is_string_name, hints.has("loose_mode"));
	return editor;
}

EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
	double default_float_step = EDITOR_GET("interface/inspector/default_float_step");

	switch (p_type) {
		// atomic types
		case Variant::NIL: {
			if (p_usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
				return memnew(EditorPropertyVariant);
			} else {
				return memnew(EditorPropertyNil);
			}
		} break;
		case Variant::BOOL: {
			EditorPropertyCheck *editor = memnew(EditorPropertyCheck);
			return editor;
		} break;
		case Variant::INT: {
			if (p_hint == PROPERTY_HINT_ENUM) {
				EditorPropertyEnum *editor = memnew(EditorPropertyEnum);
				Vector<String> options = p_hint_text.split(",");
				editor->setup(options);
				return editor;

Review comment (suggestion):
```suggestion
	editor->setup(options, Vector<String>(), is_string_name, hints.has("loose_mode"));
```

Code after:
	EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);
	Vector<String> options;
	Vector<String> builtin_options;
	List<PropertyInfo> pinfo;
	ProjectSettings::get_singleton()->get_property_list(&pinfo);
	Vector<String> hints = p_hint_text.remove_char(' ').split(",", false);

	HashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins();
	bool show_builtin = hints.has("show_builtin");

	for (const PropertyInfo &pi : pinfo) {
		if (!pi.name.begins_with("input/")) {
			continue;
		}

		const String action_name = pi.name.get_slicec('/', 1);
		if (builtins.has(action_name)) {
			if (show_builtin) {
				builtin_options.append(action_name);
			}
		} else {
			options.append(action_name);
		}
	}
	options.append_array(builtin_options);
	editor->setup(options, Vector<String>(), is_string_name, hints.has("loose_mode"));
	return editor;
}

EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
	double default_float_step = EDITOR_GET("interface/inspector/default_float_step");

	switch (p_type) {
		// atomic types
		case Variant::NIL: {
			if (p_usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
				return memnew(EditorPropertyVariant);
			} else {
				return memnew(EditorPropertyNil);
			}
		} break;
		case Variant::BOOL: {
			EditorPropertyCheck *editor = memnew(EditorPropertyCheck);
			return editor;
		} break;
		case Variant::INT: {
			if (p_hint == PROPERTY_HINT_ENUM) {
				EditorPropertyEnum *editor = memnew(EditorPropertyEnum);
				Vector<String> options = p_hint_text.split(",");
				editor->setup(options);
				return editor;