mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-24 20:51:08 +03:00
Fixed vgui_screens always sending a mouse released event to the panel when the vgui_screen loses focus
This commit is contained in:
parent
9f34a64e63
commit
9e2bdaab58
@ -478,7 +478,7 @@ void C_VGuiScreen::ClientThink( void )
|
|||||||
const int nBit = i ? IN_ATTACK2 : (IN_ATTACK | IN_USE);
|
const int nBit = i ? IN_ATTACK2 : (IN_ATTACK | IN_USE);
|
||||||
const vgui::MouseCode nButton = i ? MOUSE_RIGHT : MOUSE_LEFT;
|
const vgui::MouseCode nButton = i ? MOUSE_RIGHT : MOUSE_LEFT;
|
||||||
|
|
||||||
if ((m_nButtonReleased & nBit) || m_bLoseThinkNextFrame) // for a button release on loosing focus
|
if ((m_nButtonReleased & nBit) || ((m_nButtonState & nBit) && m_bLoseThinkNextFrame)) // for a button release on loosing focus
|
||||||
{
|
{
|
||||||
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_RELEASED);
|
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_RELEASED);
|
||||||
vgui::ivgui()->PostMessage(focus, new KeyValues("MouseReleased", "code", nButton), NULL);
|
vgui::ivgui()->PostMessage(focus, new KeyValues("MouseReleased", "code", nButton), NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user