Expose Tree::scroll_to_item()
This commit is contained in:
parent
9fb27eba8d
commit
e1054a17b5
2 changed files with 5 additions and 0 deletions
|
@ -4017,6 +4017,7 @@ void Tree::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_column_title", "column", "title"), &Tree::set_column_title);
|
||||
ClassDB::bind_method(D_METHOD("get_column_title", "column"), &Tree::get_column_title);
|
||||
ClassDB::bind_method(D_METHOD("get_scroll"), &Tree::get_scroll);
|
||||
ClassDB::bind_method(D_METHOD("scroll_to_item", "item"), &Tree::_scroll_to_item);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_hide_folding", "hide"), &Tree::set_hide_folding);
|
||||
ClassDB::bind_method(D_METHOD("is_folding_hidden"), &Tree::is_folding_hidden);
|
||||
|
|
|
@ -529,6 +529,10 @@ protected:
|
|||
return get_item_rect(Object::cast_to<TreeItem>(p_item), p_column);
|
||||
}
|
||||
|
||||
void _scroll_to_item(Object *p_item) {
|
||||
scroll_to_item(Object::cast_to<TreeItem>(p_item));
|
||||
}
|
||||
|
||||
public:
|
||||
virtual String get_tooltip(const Point2 &p_pos) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue