MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / C3DListBox

Method C3DListBox

engine/Poseidon/UI/Controls/UIControls3D.cpp:1777–1799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775 _scrollbar.SetPos(0);
1776 _scrollbar.SetSpeed(1, 1);
1777 // Always enabled — host suppresses by sizing range so page covers
1778 // the whole space, which auto-disables the underlying helper.
1779 _scrollbar.Enable(true);
1780}
1781
1782void C3DScrollBarStandalone::OnLButtonDown(float x, float y)
1783{
1784 // C3DScrollBar's hit math depends on its _down/_right vectors, which
1785 // we mirror from Control3D::_position/_right/_down. Refresh them
1786 // before forwarding so a press in the very first frame after
1787 // construction (no OnDraw yet) still computes correctly.
1788 _scrollbar.SetPosition(_position, _right, _down);
1789 IsInside(x, y);
1790 // Use GetV() so synthetic harness drags (DebugSetUV) override the
1791 // engine-computed _v. IsInside still has to run to set _u/_v for
1792 // real mouse events that don't pre-populate the debug fields.
1793 _scrollbar.OnLButtonDown(GetV());
1794}
1795
1796void C3DScrollBarStandalone::OnLButtonUp(float /*x*/, float /*y*/)
1797{
1798 _scrollbar.OnLButtonUp();
1799}
1800
1801void C3DScrollBarStandalone::OnMouseHold(float x, float y, bool /*active*/)
1802{

Callers

nothing calls this directly

Calls 9

GetPackedColorFunction · 0.85
GetFontIDFunction · 0.85
floatMaxFunction · 0.85
LoadFontMethod · 0.45
SetPositionMethod · 0.45
SetColorMethod · 0.45
SetRangeMethod · 0.45
SetPosMethod · 0.45
SetSpeedMethod · 0.45

Tested by

no test coverage detected