vgui_controls: fix mouse click
This commit is contained in:
parent
d4c9ed338f
commit
f27eb7916b
1 changed files with 4 additions and 4 deletions
|
@ -696,13 +696,13 @@ void Button::SetMouseClickEnabled(MouseCode code,bool state)
|
|||
if(state)
|
||||
{
|
||||
//set bit to 1
|
||||
_mouseClickMask|=1<<((int)(code+1));
|
||||
_mouseClickMask|=1<<(static_cast<int>(code-MOUSE_FIRST));
|
||||
}
|
||||
else
|
||||
{
|
||||
//set bit to 0
|
||||
_mouseClickMask&=~(1<<((int)(code+1)));
|
||||
}
|
||||
_mouseClickMask&=~(static_cast<int>(code-MOUSE_FIRST));
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -710,7 +710,7 @@ void Button::SetMouseClickEnabled(MouseCode code,bool state)
|
|||
//-----------------------------------------------------------------------------
|
||||
bool Button::IsMouseClickEnabled(MouseCode code)
|
||||
{
|
||||
if(_mouseClickMask&(1<<((int)(code+1))))
|
||||
if(_mouseClickMask&(1<<(static_cast<int>(code-MOUSE_FIRST))))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue