summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 3469e96a0a..c41eeb520a 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -57,10 +57,10 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
if (p_replace_mode) {
set_title(vformat(TTR("Change %s Type"), base_type));
- get_ok_button()->set_text(TTR("Change"));
+ set_ok_button_text(TTR("Change"));
} else {
set_title(vformat(TTR("Create New %s"), base_type));
- get_ok_button()->set_text(TTR("Create"));
+ set_ok_button_text(TTR("Create"));
}
_load_favorites_and_history();
@@ -474,6 +474,13 @@ void CreateDialog::select_type(const String &p_type, bool p_center_on_item) {
get_ok_button()->set_disabled(false);
}
+void CreateDialog::select_base() {
+ if (search_options_types.is_empty()) {
+ _update_search();
+ }
+ select_type(base_type, false);
+}
+
String CreateDialog::get_selected_type() {
TreeItem *selected = search_options->get_selected();
if (!selected) {