/** * task_palette.cpp * ============================================================================= * Copyright 2021-2024 Serhii Snitsaruk * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. * ============================================================================= */ #ifdef TOOLS_ENABLED #include "task_palette.h" #include "../util/limbo_compat.h" #include "../util/limbo_string_names.h" #include "../util/limbo_task_db.h" #include "../util/limbo_utility.h" #ifdef LIMBOAI_MODULE #include "core/config/project_settings.h" #include "core/error/error_macros.h" #include "editor/editor_help.h" #include "editor/editor_node.h" #include "editor/editor_paths.h" #include "editor/plugins/script_editor_plugin.h" #include "editor/themes/editor_scale.h" #include "scene/gui/check_box.h" #endif // LIMBO_MODULE #ifdef LIMBOAI_GDEXTENSION #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace godot; #endif // LIMBOAI_GDEXTENSION //**** TaskButton void TaskButton::_bind_methods() { } Control *TaskButton::_do_make_tooltip() const { #ifdef LIMBOAI_MODULE String help_symbol; bool is_resource = task_meta.begins_with("res://"); if (is_resource) { help_symbol = "class|\"" + task_meta.lstrip("res://") + "\"|"; } else { 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. Ref