Godot Version
4.2.1
Question
I’m trying to establish tooltips for a GDExtensions properties, some of which are created dynamically. Can’t find any way to do that. Checked the github and it looks like a lot of conversation about different XMLDoc formats and they can’t decide on one or something. I tried
EditorInterface::get_singleton()->get_inspector()->add_custom_property_description( ), but the method is not public / available. tried same with call and a string of the method name, nothing (false on has_method with that string too).
shows the methods defined as
void EditorInspector::add_custom_property_description(const String &p_class, const String &p_property, const String &p_description) {
const String key = vformat("property|%s|%s|", p_class, p_property);
custom_property_descriptions[key] = p_description;
}
String EditorInspector::get_custom_property_description(const String &p_property) const {
HashMap<String, String>::ConstIterator E = custom_property_descriptions.find(p_property);
if (E) {
return E->value;
}
return "";
}
But editor_inspector.hpp doesn’t show much of anything available, just get_selected_path and get_edited_object. I tried BIND_VIRTUAL_METHOD but I don’t think I’m doing that right or it’s not what that’s for.
So I’m not sure what do. I also looked at editor_property.hpp, and while it does not have “make_custom_tooltip()” listed, editor_property.cpp does show that method as defined. So perhaps theres a way for me to wrap it? or call it somehow?
Thanks