diff --git a/src/xrUICore/ComboBox/UIComboBox.cpp b/src/xrUICore/ComboBox/UIComboBox.cpp index 6117e1b1975..ce3da4ea371 100644 --- a/src/xrUICore/ComboBox/UIComboBox.cpp +++ b/src/xrUICore/ComboBox/UIComboBox.cpp @@ -268,6 +268,12 @@ void CUIComboBox::ShowList(bool bShow) } } +void CUIComboBox::SetCapture(CUIWindow* pChildWindow, bool capture_status) +{ + if (m_eState == LIST_EXPANDED && !capture_status) + return; +} + void CUIComboBox::Update() { CUIWindow::Update(); diff --git a/src/xrUICore/ComboBox/UIComboBox.h b/src/xrUICore/ComboBox/UIComboBox.h index 611c3c6be23..5375b66b977 100644 --- a/src/xrUICore/ComboBox/UIComboBox.h +++ b/src/xrUICore/ComboBox/UIComboBox.h @@ -54,6 +54,8 @@ class XRUICORE_API CUIComboBox final : public CUIWindow, public CUIOptionsItem, void disable_id(int id); void enable_id(int id); + void SetCapture(CUIWindow* pChildWindow, bool capture_status) override; + pcstr GetDebugType() override { return "CUIComboBox"; } protected: diff --git a/src/xrUICore/Windows/UIWindow.h b/src/xrUICore/Windows/UIWindow.h index 3fdb39a7d9d..c64a85f28ea 100644 --- a/src/xrUICore/Windows/UIWindow.h +++ b/src/xrUICore/Windows/UIWindow.h @@ -209,7 +209,7 @@ class XRUICORE_API CUIWindow : public CUIDebuggable //захватить/освободить мышь окном //сообщение посылается дочерним окном родительскому - void SetCapture(CUIWindow* pChildWindow, bool capture_status); + virtual void SetCapture(CUIWindow* pChildWindow, bool capture_status); [[nodiscard]] CUIWindow* GetMouseCapturer() const { return m_pMouseCapturer; }