We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f4a076 commit 7d2b309Copy full SHA for 7d2b309
src/game/client/ui_scrollregion.cpp
@@ -284,3 +284,12 @@ bool CScrollRegion::Active() const
284
{
285
return Ui()->ActiveItem() == &m_ScrollY;
286
}
287
+
288
+bool CScrollRegion::AtEnd() const
289
+{
290
+ if(m_ContentH <= m_ClipRect.h)
291
+ return true;
292
293
+ const float MaxScroll = m_ContentH - m_ClipRect.h;
294
+ return (m_ScrollY >= MaxScroll - 1.0f);
295
+}
src/game/client/ui_scrollregion.h
@@ -142,6 +142,7 @@ class CScrollRegion : private CUIElementBase
142
bool ScrollbarShown() const;
143
bool Animating() const;
144
bool Active() const;
145
+ bool AtEnd() const;
146
const CScrollRegionParams &Params() const { return m_Params; }
147
};
148
0 commit comments