| 39 | static void add_rect_to_draw(const Frect& r, const shared_str& windowName) { g_wnds_rects.emplace_back(windowName, r); } |
| 40 | |
| 41 | static void draw_rect(const Frect& r, const u32 color, const shared_str& name) |
| 42 | { |
| 43 | DRender->SetDebugShader(IDebugRender::dbgShaderWindow); |
| 44 | |
| 45 | //. UIRender->StartLineStrip (5); |
| 46 | UIRender->StartPrimitive(5, IUIRender::ptLineStrip, UI()->m_currentPointType); |
| 47 | |
| 48 | UIRender->PushPoint(r.lt.x, r.lt.y, 0, color, 0, 0); |
| 49 | UIRender->PushPoint(r.rb.x - 1, r.lt.y, 0, color, 0, 0); |
| 50 | UIRender->PushPoint(r.rb.x - 1, r.rb.y - 1, 0, color, 0, 0); |
| 51 | UIRender->PushPoint(r.lt.x, r.rb.y - 1, 0, color, 0, 0); |
| 52 | UIRender->PushPoint(r.lt.x, r.lt.y, 0, color, 0, 0); |
| 53 | |
| 54 | //. UIRender->FlushLineStrip(); |
| 55 | UIRender->FlushPrimitive(); |
| 56 | |
| 57 | if (g_show_wnd_rect_text && name.size()) |
| 58 | { |
| 59 | CGameFont* F = UI()->Font()->pFontDI; |
| 60 | const float x = r.lt.x - (r.lt.x >= 20 ? 20 : 0); |
| 61 | const float y = r.lt.y > Device.dwHeight / 2 ? r.lt.y - F->CurrentHeight_() - 20 : r.rb.y + 20; |
| 62 | F->Out(x, y, name.c_str()); |
| 63 | F->SetColor(D3DCOLOR_XRGB(255, 0, 255)); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | void draw_wnds_rects() |
| 68 | { |
no test coverage detected