You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Tooltips: Improve code clarity and docs
The return type for `_make_custom_tooltip` is clarified as Control, and users should make sure to return a visible node for proper size calculations. Moreover in the current master branch, a PopupPanel will be added as parent to the provided tooltip to make it a sub-window. Clarifies documentation for `Control._make_custom_tooltip`, and shows how to use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types to style tooltips. Fixes #39677.
This commit is contained in:
@@ -2738,7 +2738,9 @@ void Control::_bind_methods() {
|
||||
|
||||
BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
|
||||
BIND_VMETHOD(MethodInfo("drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
|
||||
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_make_custom_tooltip", PropertyInfo(Variant::STRING, "for_text")));
|
||||
BIND_VMETHOD(MethodInfo(
|
||||
PropertyInfo(Variant::OBJECT, "control", PROPERTY_HINT_RESOURCE_TYPE, "Control"),
|
||||
"_make_custom_tooltip", PropertyInfo(Variant::STRING, "for_text")));
|
||||
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_clips_input"));
|
||||
|
||||
ADD_GROUP("Anchor", "anchor_");
|
||||
|
||||
Reference in New Issue
Block a user