From 949583a6b47ad28138ea78c014ba536117b9466a Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 10 Dec 2023 14:41:00 +0100 Subject: [PATCH] Change type choice position, appearance and tooltip --- editor/editor_property_bb_param.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/editor_property_bb_param.cpp b/editor/editor_property_bb_param.cpp index 5cf8064..6a66f04 100644 --- a/editor/editor_property_bb_param.cpp +++ b/editor/editor_property_bb_param.cpp @@ -298,6 +298,12 @@ EditorPropertyBBParam::EditorPropertyBBParam() { mode_button->set_focus_mode(FOCUS_NONE); mode_button->connect(SNAME("mode_changed"), callable_mp(this, &EditorPropertyBBParam::_mode_changed)); + type_choice = memnew(MenuButton); + hbox->add_child(type_choice); + type_choice->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &EditorPropertyBBParam::_type_selected)); + type_choice->set_tooltip_text(TTR("Click to choose type")); + type_choice->set_flat(false); + editor_hbox = memnew(HBoxContainer); hbox->add_child(editor_hbox); editor_hbox->set_h_size_flags(SIZE_EXPAND_FILL); @@ -309,10 +315,6 @@ EditorPropertyBBParam::EditorPropertyBBParam() { variable_edit->set_h_size_flags(SIZE_EXPAND_FILL); variable_edit->connect(SNAME("text_changed"), callable_mp(this, &EditorPropertyBBParam::_variable_edited)); - type_choice = memnew(MenuButton); - hbox->add_child(type_choice); - type_choice->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &EditorPropertyBBParam::_type_selected)); - param_type = SNAME("BBString"); }