| 11 | CUICursor::~CUICursor() { Device.seqRender.Remove(this); } |
| 12 | |
| 13 | void 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 | |
| 31 | void CUICursor::OnRender() |
| 32 | { |
nothing calls this directly
no test coverage detected