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

Method InitInternal

ogsr_engine/xrGame/UICursor.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11CUICursor::~CUICursor() { Device.seqRender.Remove(this); }
12
13void CUICursor::InitInternal()
14{
15 m_static = std::make_unique<CUIStatic>();
16 m_static->InitTextureEx("ui\\ui_ani_cursor", "hud\\cursor");
17
18 constexpr Frect rect{0.0f, 0.0f, 40.0f, 40.0f};
19 m_static->SetOriginalRect(rect);
20
21 Fvector2 sz{rect.rb};
22 sz.x *= UI()->get_current_kx();
23
24 sz.x *= READ_IF_EXISTS(pSettings, r_float, "ui_tweaks", "cursor_scale_x", 1.f);
25 sz.y *= READ_IF_EXISTS(pSettings, r_float, "ui_tweaks", "cursor_scale_y", 1.f);
26
27 m_static->SetWndSize(sz);
28 m_static->SetStretchTexture(true);
29}
30
31void CUICursor::OnRender()
32{

Callers

nothing calls this directly

Calls 6

UIFunction · 0.85
InitTextureExMethod · 0.80
get_current_kxMethod · 0.80
SetOriginalRectMethod · 0.45
SetWndSizeMethod · 0.45
SetStretchTextureMethod · 0.45

Tested by

no test coverage detected