Only highlight hovered edit boxes when they are the hot item

Prevent highlighting when edit box hovered but behind a popup menu.
This commit is contained in:
Robert Müller 2023-06-04 14:21:14 +02:00
parent 878eedeed7
commit efea2de9d5

View file

@ -783,7 +783,7 @@ bool CUI::DoEditBox(CLineInput *pLineInput, const CUIRect *pRect, float FontSize
}
// Render
pRect->Draw(ms_LightButtonColorFunction.GetColor(Active, Inside), Corners, 3.0f);
pRect->Draw(ms_LightButtonColorFunction.GetColor(Active, HotItem() == pLineInput), Corners, 3.0f);
ClipEnable(pRect);
Textbox.x -= ScrollOffset;
const STextBoundingBox BoundingBox = pLineInput->Render(&Textbox, FontSize, TEXTALIGN_ML, Changed, -1.0f);