MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UpdateScroll

Method UpdateScroll

ogsr_engine/xrGame/ui/UIScrollView.cpp:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void CUIScrollView::UpdateScroll()
159{
160 if (NeedShowScrollBar())
161 m_VScrollBar->Show(true);
162 else
163 m_VScrollBar->Show(false);
164
165 Fvector2 w_pos = m_pad->GetWndPos();
166
167 m_VScrollBar->SetHeight(GetHeight());
168 m_VScrollBar->SetRange(0, iFloor(m_pad->GetHeight() * Scroll2ViewV()));
169
170 int value = iFloor(-w_pos.y);
171 SetScrollPos(value);
172}
173
174float CUIScrollView::Scroll2ViewV()
175{

Callers

nothing calls this directly

Calls 6

GetWndPosMethod · 0.80
GetHeightMethod · 0.80
GetHeightFunction · 0.50
ShowMethod · 0.45
SetHeightMethod · 0.45
SetRangeMethod · 0.45

Tested by

no test coverage detected