|
|
|
|
@ -1721,6 +1721,20 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tree::_text_editor_modal_close() {
|
|
|
|
|
|
|
|
|
|
if ( Input::get_singleton()->is_key_pressed(KEY_ESCAPE) ||
|
|
|
|
|
Input::get_singleton()->is_key_pressed(KEY_ENTER) ||
|
|
|
|
|
Input::get_singleton()->is_key_pressed(KEY_RETURN) ) {
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text_editor_enter(text_editor->get_text());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tree::text_editor_enter(String p_text) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3185,6 +3199,7 @@ void Tree::_bind_methods() {
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_input_event"),&Tree::_input_event);
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_popup_select"),&Tree::popup_select);
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter);
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close);
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_value_editor_changed"),&Tree::value_editor_changed);
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved);
|
|
|
|
|
|
|
|
|
|
@ -3283,6 +3298,7 @@ Tree::Tree() {
|
|
|
|
|
h_scroll->connect("value_changed", this,"_scroll_moved");
|
|
|
|
|
v_scroll->connect("value_changed", this,"_scroll_moved");
|
|
|
|
|
text_editor->connect("text_entered", this,"_text_editor_enter");
|
|
|
|
|
text_editor->connect("modal_close", this,"_text_editor_modal_close");
|
|
|
|
|
popup_menu->connect("item_pressed", this,"_popup_select");
|
|
|
|
|
value_editor->connect("value_changed", this,"_value_editor_changed");
|
|
|
|
|
|
|
|
|
|
|