| 218 | }; |
| 219 | |
| 220 | void DrawRectangle(const u32 x, const u32 y, const u32 width, const u32 height, const ImU32 color) { |
| 221 | auto draw_list = ImGui::GetWindowDrawList(); |
| 222 | const auto canvas_pos = ImGui::GetCursorScreenPos(); |
| 223 | |
| 224 | const auto pos_a = ImVec2(canvas_pos.x + x * g_Scale, canvas_pos.y + y * g_Scale); |
| 225 | const auto pos_b = ImVec2(pos_a.x + width * g_Scale, pos_a.y + height * g_Scale); |
| 226 | draw_list->AddRectFilled(pos_a, pos_b, color); |
| 227 | } |
| 228 | |
| 229 | void ProcessText(const std::string &text, const ul::design::FontSize font_size, u32 &out_width, u32 &out_height, ImFont *&out_font, float &out_font_size) { |
| 230 | switch(static_cast<ul::design::FontSize>(font_size)) { |