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

Method Draw

ogsr_engine/xrGame/ui/UIArtefactPanel.cpp:30–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void CUIArtefactPanel::Draw()
31{
32 const float iIndent = 1.0f;
33 float x = 0.0f;
34 float y = 0.0f;
35 float iHeight;
36 float iWidth;
37
38 Frect rect;
39 GetAbsoluteRect(rect);
40 x = rect.left;
41 y = rect.top;
42
43 float _s = m_cell_size.x / m_cell_size.y;
44
45 for (const auto& params : m_vRects)
46 {
47 params->set_shader(&m_si);
48 const auto& r = params->original_rect();
49 iHeight = m_fScale * (r.bottom - r.top);
50 iWidth = _s * m_fScale * (r.right - r.left);
51
52 m_si.SetRect(0, 0, iWidth, iHeight);
53
54 m_si.SetPos(x, y);
55 x = x + iIndent + iWidth;
56
57 m_si.Render();
58 }
59
60 CUIWindow::Draw();
61}

Callers

nothing calls this directly

Calls 5

DrawFunction · 0.85
set_shaderMethod · 0.80
SetRectMethod · 0.80
SetPosMethod · 0.45
RenderMethod · 0.45

Tested by

no test coverage detected