Merge pull request #71064 from DarkMessiah/expose_clear_tabs

Expose TabBar::clear_tabs to GDScript
This commit is contained in:
Rémi Verschelde 2023-01-08 22:45:58 +01:00
commit 69fd2f3571
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 7 additions and 0 deletions

View file

@ -17,6 +17,12 @@
Adds a new tab.
</description>
</method>
<method name="clear_tabs">
<return type="void" />
<description>
Clears all tabs.
</description>
</method>
<method name="ensure_tab_visible">
<return type="void" />
<param index="0" name="idx" type="int" />

View file

@ -1577,6 +1577,7 @@ void TabBar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_scroll_to_selected"), &TabBar::get_scroll_to_selected);
ClassDB::bind_method(D_METHOD("set_select_with_rmb", "enabled"), &TabBar::set_select_with_rmb);
ClassDB::bind_method(D_METHOD("get_select_with_rmb"), &TabBar::get_select_with_rmb);
ClassDB::bind_method(D_METHOD("clear_tabs"), &TabBar::clear_tabs);
ADD_SIGNAL(MethodInfo("tab_selected", PropertyInfo(Variant::INT, "tab")));
ADD_SIGNAL(MethodInfo("tab_changed", PropertyInfo(Variant::INT, "tab")));