mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 07:17:57 +03:00
Fixed C_VGuiScreen sending reversed pressed/unpressed events to the panel
This commit is contained in:
parent
db0e0fc29e
commit
e304b1a90e
@ -480,13 +480,13 @@ void C_VGuiScreen::ClientThink( void )
|
||||
|
||||
if ((m_nButtonReleased & nBit) || m_bLoseThinkNextFrame) // for a button release on loosing focus
|
||||
{
|
||||
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_PRESSED);
|
||||
vgui::ivgui()->PostMessage(focus, new KeyValues("MousePressed", "code", nButton), NULL);
|
||||
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_RELEASED);
|
||||
vgui::ivgui()->PostMessage(focus, new KeyValues("MouseReleased", "code", nButton), NULL);
|
||||
}
|
||||
else if (m_nButtonPressed & nBit)
|
||||
{
|
||||
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_RELEASED);
|
||||
vgui::ivgui()->PostMessage(focus, new KeyValues("MouseReleased", "code", nButton), NULL);
|
||||
g_InputInternal->SetMouseCodeState(nButton, vgui::BUTTON_PRESSED);
|
||||
vgui::ivgui()->PostMessage(focus, new KeyValues("MousePressed", "code", nButton), NULL);
|
||||
}
|
||||
}
|
||||
#endif // !MAPBASE
|
||||
|
Loading…
x
Reference in New Issue
Block a user