Skip to content

Commit

Permalink
xrUICore/TabControl/UITabControl_script.cpp: added additional overloa…
Browse files Browse the repository at this point in the history
…d for AddItem function for SOC scripts (#392)
  • Loading branch information
Xottab-DUTY committed Oct 8, 2022
1 parent 33a1059 commit d1cb7a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xrUICore/TabControl/UITabControl_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ SCRIPT_EXPORT(CUITabControl, (CUIWindow),
class_<CUITabControl, CUIWindow>("CUITabControl")
.def(constructor<>())
.def("AddItem", (bool (CUITabControl::*)(CUITabButton*))(&CUITabControl::AddItem), adopt<2>())
.def("AddItem", (bool (CUITabControl::*)(LPCSTR, LPCSTR, Fvector2, Fvector2)) & CUITabControl::AddItem)
.def("AddItem", (bool (CUITabControl::*)(pcstr, pcstr, Fvector2, Fvector2)) &CUITabControl::AddItem)
.def("AddItem", +[](CUITabControl* self, pcstr pItemName, pcstr pTexName, float x, float y, float width, float height)
{
self->AddItem(pItemName, pTexName, { x, y }, { width, height });
})
.def("RemoveItem", &CUITabControl::RemoveItemByIndex)
.def("RemoveItem", &CUITabControl::RemoveItemById_script)
.def("RemoveAll", &CUITabControl::RemoveAll)
Expand Down

0 comments on commit d1cb7a5

Please sign in to comment.