Skip to content

Commit

Permalink
Refactor EditorHelpBit usage
Browse files Browse the repository at this point in the history
Due to upstream change:

	godotengine/godot@4e19ab8
  • Loading branch information
Rubonnek committed Jan 2, 2025
1 parent 8aff1db commit 903fc22
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions editor/task_palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ Control *TaskButton::_do_make_tooltip() const {
help_symbol = "class|" + task_meta + "|";
}

EditorHelpBit *help_bit = memnew(EditorHelpBit(help_symbol));
help_bit->set_content_height_limits(1, 360 * EDSCALE);

String desc = _module_get_help_description(task_meta);
if (desc.is_empty() && is_resource) {
// ! HACK: Force documentation parsing.
Expand All @@ -84,14 +81,10 @@ Control *TaskButton::_do_make_tooltip() const {
desc = _module_get_help_description(task_meta);
}
}
if (desc.is_empty() && help_bit->get_description().is_empty()) {
if (desc.is_empty()) {
desc = "[i]" + TTR("No description.") + "[/i]";
}
if (!desc.is_empty()) {
help_bit->set_description(desc);
}

EditorHelpBitTooltip::show_tooltip(help_bit, const_cast<TaskButton *>(this));
EditorHelpBitTooltip::show_tooltip(const_cast<TaskButton *>(this), help_symbol, desc);
#endif // LIMBOAI_MODULE

#ifdef LIMBOAI_GDEXTENSION
Expand Down

0 comments on commit 903fc22

Please sign in to comment.