summaryrefslogtreecommitdiff
path: root/editor/editor_help.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r--editor/editor_help.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index a36e2f360e..050b0a5f33 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -30,7 +30,7 @@
#include "editor_help.h"
-#include "core/input/input_filter.h"
+#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "doc_data_compressed.gen.h"
#include "editor/plugins/script_editor_plugin.h"
@@ -198,7 +198,12 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
const Color text_color = get_theme_color("default_color", "RichTextLabel");
const Color type_color = get_theme_color("accent_color", "Editor").linear_interpolate(text_color, 0.5);
class_desc->push_color(type_color);
+ bool add_array = false;
if (can_ref) {
+ if (t.ends_with("[]")) {
+ add_array = true;
+ t = t.replace("[]", "");
+ }
if (p_enum.empty()) {
class_desc->push_meta("#" + t); //class
} else {
@@ -206,8 +211,15 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
}
}
class_desc->add_text(t);
- if (can_ref)
+ if (can_ref) {
class_desc->pop();
+ if (add_array) {
+ class_desc->add_text(" ");
+ class_desc->push_meta("#Array"); //class
+ class_desc->add_text("[]");
+ class_desc->pop();
+ }
+ }
class_desc->pop();
}
@@ -1832,7 +1844,7 @@ void FindBar::_search_text_changed(const String &p_text) {
void FindBar::_search_text_entered(const String &p_text) {
- if (InputFilter::get_singleton()->is_key_pressed(KEY_SHIFT)) {
+ if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
search_prev();
} else {
search_next();