From 04ade4d63978ebeb67a0a2c1d9179735bc6b1229 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 9 Sep 2016 15:20:57 +0100 Subject: [PATCH] Added get_v_scroll to item list, issue 5343 (cherry picked from commit 63fd8f863b731ae524205393d178aa55aad8b837) --- scene/gui/item_list.cpp | 2 ++ scene/gui/item_list.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 63902ef8157..89cd509fbd2 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1358,6 +1358,8 @@ void ItemList::_bind_methods(){ ObjectTypeDB::bind_method(_MD("ensure_current_is_visible"),&ItemList::ensure_current_is_visible); + ObjectTypeDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll); + ObjectTypeDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed); ObjectTypeDB::bind_method(_MD("_input_event"),&ItemList::_input_event); diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h index 91c74b52915..cb5908bc79f 100644 --- a/scene/gui/item_list.h +++ b/scene/gui/item_list.h @@ -195,6 +195,8 @@ public: void set_icon_scale(real_t p_scale); real_t get_icon_scale() const; + VScrollBar *get_v_scroll() { return scroll_bar; } + ItemList(); ~ItemList(); };