VGUILib: Fixed draw/input flag-check inconsistency in CUIMenuButton

This commit is contained in:
Marco Cawthorne 2020-09-29 13:50:19 +02:00
parent 57cc661c86
commit 8fab5921a0

View file

@ -104,12 +104,12 @@ void CUIMenuButton::Draw(void)
void CUIMenuButton::Input (float flEVType, float flKey, float flChar, float flDevID)
{
// If we're not ingame
if (clientstate() != 2) {
if (!(m_iFlags & MBUTTON_SHOWOFFLINE)) {
if (clientstate() == 2 && !g_background) {
if (!(m_iFlags & MBUTTON_SHOWSP)) {
return;
}
} else {
if (!(m_iFlags & MBUTTON_SHOWSP)) {
if (!(m_iFlags & MBUTTON_SHOWOFFLINE)) {
return;
}
}