Compare commits

...

7 Commits

Author SHA1 Message Date
Wilson E. Alvarez aa7d8ea50e
Fix GCC warning for unhandled 'PACKED_VECTOR4_ARRAY' in switch 2024-05-05 09:00:09 -04:00
Wilson E. Alvarez 1a228ba88e
Update EditorPlugin header location
Due to upstream change:

	1bcbbe96c4
2024-05-05 09:00:09 -04:00
Wilson E. Alvarez 4fc3f1d9fc
Update EditorHelpBit calls
Due to upstream change:

	a714cb9f65
2024-05-05 09:00:09 -04:00
Wilson E. Alvarez facb813b44
Add missing MarginContainer header
Due to upstream change:

	7884d63281
2024-05-05 09:00:09 -04:00
Wilson E. Alvarez 0d34c4e887
Fix bottom panel visbility calls
Due to upstream change:

	eb6ca91ba6
2024-05-05 09:00:09 -04:00
Wilson E. Alvarez 2a4fd275cc
Migrate to Tree::set_custom_draw_callback.
Due to upstream change:

	a32a2eaedc
2024-05-05 09:00:09 -04:00
Wilson E. Alvarez 1ba6e861f9
Fix upstream EditorScale header locations
Due to upstream change:

	4b55c81eba
2024-05-05 09:00:09 -04:00
11 changed files with 22 additions and 29 deletions

View File

@ -17,7 +17,7 @@
#include "../util/limbo_string_names.h" #include "../util/limbo_string_names.h"
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
#include "editor/editor_scale.h" #include "editor/themes/editor_scale.h"
#include "scene/gui/button.h" #include "scene/gui/button.h"
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE

View File

@ -19,8 +19,9 @@
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
#include "editor/editor_interface.h" #include "editor/editor_interface.h"
#include "editor/editor_scale.h" #include "editor/themes/editor_scale.h"
#include "scene/gui/line_edit.h" #include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/panel_container.h" #include "scene/gui/panel_container.h"
#include "scene/resources/style_box_flat.h" #include "scene/resources/style_box_flat.h"
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE

View File

@ -24,7 +24,7 @@
#include "core/object/callable_method_pointer.h" #include "core/object/callable_method_pointer.h"
#include "core/os/time.h" #include "core/os/time.h"
#include "core/typedefs.h" #include "core/typedefs.h"
#include "editor/editor_scale.h" #include "editor/themes/editor_scale.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "scene/resources/style_box.h" #include "scene/resources/style_box.h"
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE
@ -127,16 +127,16 @@ void BehaviorTreeView::_update_tree(const Ref<BehaviorTreeData> &p_data) {
if (status_changed) { if (status_changed) {
item->set_metadata(1, current_status); item->set_metadata(1, current_status);
if (current_status == BTTask::SUCCESS) { if (current_status == BTTask::SUCCESS) {
item->set_custom_draw(0, this, LW_NAME(_draw_success_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_success_status));
item->set_icon(1, theme_cache.icon_success); item->set_icon(1, theme_cache.icon_success);
} else if (current_status == BTTask::FAILURE) { } else if (current_status == BTTask::FAILURE) {
item->set_custom_draw(0, this, LW_NAME(_draw_failure_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_failure_status));
item->set_icon(1, theme_cache.icon_failure); item->set_icon(1, theme_cache.icon_failure);
} else if (current_status == BTTask::RUNNING) { } else if (current_status == BTTask::RUNNING) {
item->set_custom_draw(0, this, LW_NAME(_draw_running_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_running_status));
item->set_icon(1, theme_cache.icon_running); item->set_icon(1, theme_cache.icon_running);
} else { } else {
item->set_custom_draw(0, this, LW_NAME(_draw_fresh)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_fresh));
item->set_icon(1, nullptr); item->set_icon(1, nullptr);
} }
} }
@ -204,13 +204,13 @@ void BehaviorTreeView::_update_tree(const Ref<BehaviorTreeData> &p_data) {
item->set_icon_max_width(0, 16 * _get_editor_scale()); // Force user icon size. item->set_icon_max_width(0, 16 * _get_editor_scale()); // Force user icon size.
if (task_data.status == BTTask::SUCCESS) { if (task_data.status == BTTask::SUCCESS) {
item->set_custom_draw(0, this, LW_NAME(_draw_success_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_success_status));
item->set_icon(1, theme_cache.icon_success); item->set_icon(1, theme_cache.icon_success);
} else if (task_data.status == BTTask::FAILURE) { } else if (task_data.status == BTTask::FAILURE) {
item->set_custom_draw(0, this, LW_NAME(_draw_failure_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_failure_status));
item->set_icon(1, theme_cache.icon_failure); item->set_icon(1, theme_cache.icon_failure);
} else if (task_data.status == BTTask::RUNNING) { } else if (task_data.status == BTTask::RUNNING) {
item->set_custom_draw(0, this, LW_NAME(_draw_running_status)); item->set_custom_draw_callback(0, callable_mp(this, &BehaviorTreeView::_draw_running_status));
item->set_icon(1, theme_cache.icon_running); item->set_icon(1, theme_cache.icon_running);
} }

View File

@ -31,9 +31,9 @@
#include "core/variant/array.h" #include "core/variant/array.h"
#include "editor/editor_interface.h" #include "editor/editor_interface.h"
#include "editor/editor_paths.h" #include "editor/editor_paths.h"
#include "editor/editor_scale.h"
#include "editor/filesystem_dock.h" #include "editor/filesystem_dock.h"
#include "editor/plugins/editor_debugger_plugin.h" #include "editor/plugins/editor_debugger_plugin.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/box_container.h" #include "scene/gui/box_container.h"
#include "scene/gui/control.h" #include "scene/gui/control.h"
#include "scene/gui/item_list.h" #include "scene/gui/item_list.h"

View File

@ -34,12 +34,13 @@
#include "editor/editor_file_system.h" #include "editor/editor_file_system.h"
#include "editor/editor_help.h" #include "editor/editor_help.h"
#include "editor/editor_paths.h" #include "editor/editor_paths.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h" #include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/inspector_dock.h" #include "editor/inspector_dock.h"
#include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h"
#include "editor/project_settings_editor.h" #include "editor/project_settings_editor.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/panel_container.h" #include "scene/gui/panel_container.h"
#include "scene/gui/separator.h" #include "scene/gui/separator.h"
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE
@ -682,7 +683,7 @@ void LimboAIEditor::_misc_option_selected(int p_id) {
LimboDebuggerPlugin::get_singleton()->get_first_session_window()->set_window_enabled(true); LimboDebuggerPlugin::get_singleton()->get_first_session_window()->set_window_enabled(true);
} else { } else {
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorDebuggerNode::get_singleton()); EditorNode::get_bottom_panel()->make_item_visible(EditorDebuggerNode::get_singleton());
EditorDebuggerNode::get_singleton()->get_default_debugger()->switch_to_debugger( EditorDebuggerNode::get_singleton()->get_default_debugger()->switch_to_debugger(
LimboDebuggerPlugin::get_singleton()->get_first_session_tab_index()); LimboDebuggerPlugin::get_singleton()->get_first_session_tab_index());
#elif LIMBOAI_GDEXTENSION #elif LIMBOAI_GDEXTENSION

View File

@ -25,7 +25,7 @@
#include "core/object/object.h" #include "core/object/object.h"
#include "core/templates/hash_set.h" #include "core/templates/hash_set.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_plugin.h" #include "editor/plugins/editor_plugin.h"
#include "editor/gui/editor_spin_slider.h" #include "editor/gui/editor_spin_slider.h"
#include "scene/gui/box_container.h" #include "scene/gui/box_container.h"
#include "scene/gui/control.h" #include "scene/gui/control.h"

View File

@ -24,7 +24,7 @@
#include "editor/editor_help.h" #include "editor/editor_help.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_paths.h" #include "editor/editor_paths.h"
#include "editor/editor_scale.h" #include "editor/themes/editor_scale.h"
#include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h"
#include "scene/gui/check_box.h" #include "scene/gui/check_box.h"
#endif // LIMBO_MODULE #endif // LIMBO_MODULE
@ -60,7 +60,7 @@ void TaskButton::_bind_methods() {
Control *TaskButton::_do_make_tooltip(const String &p_text) const { Control *TaskButton::_do_make_tooltip(const String &p_text) const {
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
EditorHelpBit *help_bit = memnew(EditorHelpBit); EditorHelpBit *help_bit = memnew(EditorHelpBit);
help_bit->get_rich_text()->set_custom_minimum_size(Size2(360 * EDSCALE, 1)); help_bit->set_content_height_limits(1, 360 * EDSCALE);
String help_text; String help_text;
if (!p_text.is_empty()) { if (!p_text.is_empty()) {
@ -69,7 +69,7 @@ Control *TaskButton::_do_make_tooltip(const String &p_text) const {
help_text = "[i]" + TTR("No description.") + "[/i]"; help_text = "[i]" + TTR("No description.") + "[/i]";
} }
help_bit->set_text(help_text); help_bit->set_custom_text(String(), String(), help_text);
return help_bit; return help_bit;
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE

View File

@ -20,7 +20,7 @@
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
#include "core/object/script_language.h" #include "core/object/script_language.h"
#include "editor/editor_scale.h" #include "editor/themes/editor_scale.h"
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE
#ifdef LIMBOAI_GDEXTENSION #ifdef LIMBOAI_GDEXTENSION
@ -50,7 +50,7 @@ void TaskTree::_update_item(TreeItem *p_item) {
if (p_item->get_parent()) { if (p_item->get_parent()) {
Ref<BTProbabilitySelector> sel = p_item->get_parent()->get_metadata(0); Ref<BTProbabilitySelector> sel = p_item->get_parent()->get_metadata(0);
if (sel.is_valid() && sel->has_probability(p_item->get_index())) { if (sel.is_valid() && sel->has_probability(p_item->get_index())) {
p_item->set_custom_draw(0, this, LW_NAME(_draw_probability)); p_item->set_custom_draw_callback(0, callable_mp(this, &TaskTree::_draw_probability));
p_item->set_cell_mode(0, TreeItem::CELL_MODE_CUSTOM); p_item->set_cell_mode(0, TreeItem::CELL_MODE_CUSTOM);
} }
} }

View File

@ -27,11 +27,6 @@
LimboStringNames *LimboStringNames::singleton = nullptr; LimboStringNames *LimboStringNames::singleton = nullptr;
LimboStringNames::LimboStringNames() { LimboStringNames::LimboStringNames() {
_draw_failure_status = SN("_draw_failure_status");
_draw_fresh = SN("_draw_fresh");
_draw_probability = SN("_draw_probability");
_draw_running_status = SN("_draw_running_status");
_draw_success_status = SN("_draw_success_status");
_enter = SN("_enter"); _enter = SN("_enter");
_exit = SN("_exit"); _exit = SN("_exit");
_generate_name = SN("_generate_name"); _generate_name = SN("_generate_name");

View File

@ -41,11 +41,6 @@ class LimboStringNames {
public: public:
_FORCE_INLINE_ static LimboStringNames *get_singleton() { return singleton; } _FORCE_INLINE_ static LimboStringNames *get_singleton() { return singleton; }
StringName _draw_failure_status;
StringName _draw_fresh;
StringName _draw_probability;
StringName _draw_running_status;
StringName _draw_success_status;
StringName _enter; StringName _enter;
StringName _exit; StringName _exit;
StringName _generate_name; StringName _generate_name;

View File

@ -515,6 +515,7 @@ PackedInt32Array LimboUtility::get_property_hints_allowed_for_type(Variant::Type
case Variant::Type::PACKED_STRING_ARRAY: case Variant::Type::PACKED_STRING_ARRAY:
case Variant::Type::PACKED_VECTOR2_ARRAY: case Variant::Type::PACKED_VECTOR2_ARRAY:
case Variant::Type::PACKED_VECTOR3_ARRAY: case Variant::Type::PACKED_VECTOR3_ARRAY:
case Variant::Type::PACKED_VECTOR4_ARRAY:
case Variant::Type::PACKED_COLOR_ARRAY: case Variant::Type::PACKED_COLOR_ARRAY:
case Variant::Type::VARIANT_MAX: { case Variant::Type::VARIANT_MAX: {
} break; } break;