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

Method OnRender

ogsr_engine/xrGame/UICursor.cpp:31–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void CUICursor::OnRender()
32{
33 static u32 last_frame{};
34 if (last_frame == Device.dwFrame)
35 return;
36 last_frame = Device.dwFrame;
37
38 if (!IsVisible())
39 return;
40
41#ifdef DEBUG
42 static u32 last_render_frame = 0;
43 VERIFY(last_render_frame != Device.dwFrame);
44 last_render_frame = Device.dwFrame;
45
46 if (bDebug)
47 {
48 CGameFont* F = UI()->Font()->pFontDI;
49 F->SetAligment(CGameFont::alCenter);
50 F->SetHeightI(0.02f);
51 F->OutSetI(0.f, -0.9f);
52 F->SetColor(0xffffffff);
53 Fvector2 pt = GetCursorPosition();
54 F->OutNext("%f-%f", pt.x, pt.y);
55 }
56#endif
57
58 m_static->SetWndPos(vPos);
59 m_static->Update();
60 m_static->Draw();
61}
62
63Fvector2 CUICursor::GetCursorPosition() const { return vPos; }
64

Callers

nothing calls this directly

Calls 9

UIFunction · 0.85
FontMethod · 0.80
SetHeightIMethod · 0.80
OutSetIMethod · 0.80
OutNextMethod · 0.80
SetColorMethod · 0.45
SetWndPosMethod · 0.45
UpdateMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected