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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index d859f7cbe4..f6c3b57589 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -44,7 +44,7 @@
class CreateDialog : public ConfirmationDialog {
- GDCLASS(CreateDialog, ConfirmationDialog)
+ GDCLASS(CreateDialog, ConfirmationDialog);
Vector<String> favorite_list;
Tree *favorites;
@@ -53,6 +53,7 @@ class CreateDialog : public ConfirmationDialog {
Button *favorite;
LineEdit *search_box;
Tree *search_options;
+ HashMap<String, TreeItem *> search_options_types;
bool is_replace_mode;
String base_type;
String preferred_search_result_type;
@@ -82,11 +83,14 @@ class CreateDialog : public ConfirmationDialog {
void add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem *p_root, TreeItem **to_select);
+ void select_type(const String &p_type);
+
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
bool _is_class_disabled_by_feature_profile(const StringName &p_class);
+ bool _is_type_prefered(const String &type);
protected:
void _notification(int p_what);
@@ -104,7 +108,7 @@ public:
void set_preferred_search_result_type(const String &p_preferred_type);
String get_preferred_search_result_type();
- void popup_create(bool p_dont_clear, bool p_replace_mode = false);
+ void popup_create(bool p_dont_clear, bool p_replace_mode = false, const String &p_select_type = "Node");
CreateDialog();
};