VGUIButton: in CLASSIC_VGUI mode, the alternate button frame happens on hover now instead of click.

This commit is contained in:
Marco Cawthorne 2023-04-18 20:10:13 -07:00
parent a34fd9c0e8
commit a1d8f17164
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ VGUIButton::Draw(void)
}
#else
if (m_iFlags & BUTTON_DOWN) {
if (m_iFlags & BUTTON_HOVER) {
drawfill(m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, 0.25f);
}
drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, m_vecSize[1] - 1], [m_vecSize[0], 1], m_vecColor, 1.0f);
@ -250,7 +250,7 @@ VGUIButton::Input(float flEVType, float flKey, float flChar, float flDevID)
if (mouseHover == true && HasFlag(BUTTON_HOVER) == false) {
FlagAdd(BUTTON_HOVER);
OnMouseEntered();
} else if (HasFlag(BUTTON_HOVER)) {
} else if (HasFlag(BUTTON_HOVER) && mouseHover == false) {
FlagRemove(BUTTON_HOVER);
OnMouseExited();
}