Fix scrollbar going out of bounce (fixes #3416)

This commit is contained in:
def 2021-01-04 19:16:38 +01:00
parent 71a371a4ee
commit 088420459f

View file

@ -570,7 +570,7 @@ void CMenus::UiDoListboxStart(const void *pID, const CUIRect *pRect, float RowHe
} }
Scroll.HMargin(5.0f, &Scroll); Scroll.HMargin(5.0f, &Scroll);
gs_ListBoxScrollValue = clamp(DoScrollbarV(pID, &Scroll, gs_ListBoxScrollValue), 0.0f, 1.0f); gs_ListBoxScrollValue = clamp(DoScrollbarV(pID, &Scroll, clamp(gs_ListBoxScrollValue, 0.0f, 1.0f)), 0.0f, 1.0f);
// the list // the list
gs_ListBoxView = gs_ListBoxOriginalView; gs_ListBoxView = gs_ListBoxOriginalView;