| 31 | #include <Main/engine.h> |
| 32 | |
| 33 | void GameCursor::Draw() { |
| 34 | if (Graphics::Instance()->media_mode()) { |
| 35 | UIShowCursor(true); |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | if (!visible || !m_texture_ref.valid()) return; |
| 40 | |
| 41 | CHECK_GL_ERROR(); |
| 42 | int* mouse_pos = Input::Instance()->getMouse().pos_; |
| 43 | int* window_dims = Graphics::Instance()->window_dims; |
| 44 | vec3 draw_pos( |
| 45 | (float)(mouse_pos[0] + m_offset_x), |
| 46 | (float)((window_dims[1] - mouse_pos[1]) - m_offset_y), |
| 47 | 0.0f); |
| 48 | Textures::Instance()->drawTexture(m_texture_ref, draw_pos, |
| 49 | m_size, m_rotation); |
| 50 | CHECK_GL_ERROR(); |
| 51 | } |
| 52 | |
| 53 | void GameCursor::SetCursor(_cursor_type t) { |
| 54 | // std::pair<int, int> dimensions; |
nothing calls this directly
no test coverage detected