mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
Imgui scroll fix for variable scrollable area height.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user