summaryrefslogtreecommitdiff
path: root/editor/create_dialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/create_dialog.h')
-rw-r--r--editor/create_dialog.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index b08cb72f14..f905160df3 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,6 +41,12 @@
class CreateDialog : public ConfirmationDialog {
GDCLASS(CreateDialog, ConfirmationDialog);
+ enum TypeCategory {
+ CPP_TYPE,
+ PATH_TYPE,
+ OTHER_TYPE
+ };
+
LineEdit *search_box;
Tree *search_options;
@@ -62,8 +68,8 @@ class CreateDialog : public ConfirmationDialog {
void _update_search();
bool _should_hide_type(const String &p_type) const;
- void _add_type(const String &p_current, bool p_cpp_type);
- void _configure_search_option_item(TreeItem *r_item, const String &p_type, const bool p_cpp_type);
+ void _add_type(const String &p_type, const TypeCategory p_type_category);
+ void _configure_search_option_item(TreeItem *r_item, const String &p_type, const TypeCategory p_type_category);
String _top_result(const Vector<String> p_candidates, const String &p_search_text) const;
float _score_type(const String &p_type, const String &p_search) const;
bool _is_type_preferred(const String &p_type) const;
@@ -95,6 +101,8 @@ class CreateDialog : public ConfirmationDialog {
bool _is_class_disabled_by_feature_profile(const StringName &p_class) const;
void _load_favorites_and_history();
+ void _update_theme();
+
protected:
void _notification(int p_what);
static void _bind_methods();