mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Imgui scroll fix for variable scrollable area height.
This commit is contained in:
parent
9715d6fab4
commit
d64a62866a
1 changed files with 4 additions and 0 deletions
|
@ -773,6 +773,10 @@ struct Imgui
|
|||
|
||||
if (barHeight < 1.0f)
|
||||
{
|
||||
// Handle m_scrollVal properly on variable scrollable area height.
|
||||
const int32_t diff = height - sh;
|
||||
*m_scrollVal = (*m_scrollVal < diff) ? diff : *m_scrollVal; // m_scrollVal = max(m_scrollVal, diff).
|
||||
|
||||
float barY = bx::fsaturate( (float)(yy - stop) / (float)sh);
|
||||
|
||||
// Handle scroll bar logic.
|
||||
|
|
Loading…
Reference in a new issue