From d1cb7a5ceddb9466d46d9df49ed83d70093c96f1 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Sat, 8 Oct 2022 19:42:11 +0300 Subject: [PATCH] xrUICore/TabControl/UITabControl_script.cpp: added additional overload for AddItem function for SOC scripts (#392) --- src/xrUICore/TabControl/UITabControl_script.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xrUICore/TabControl/UITabControl_script.cpp b/src/xrUICore/TabControl/UITabControl_script.cpp index 945f2cd2fd7..5cd3bf220b1 100644 --- a/src/xrUICore/TabControl/UITabControl_script.cpp +++ b/src/xrUICore/TabControl/UITabControl_script.cpp @@ -13,7 +13,11 @@ SCRIPT_EXPORT(CUITabControl, (CUIWindow), class_("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)