| 168 | } |
| 169 | |
| 170 | void Window_StringView::DrawLine(int index) { |
| 171 | Rect rect = GetItemRect(index + GetReservedLineCount()); |
| 172 | //contents->ClearRect(rect); |
| 173 | |
| 174 | std::string line = lines[index]; |
| 175 | |
| 176 | if (!line.empty()) { |
| 177 | if (line_numbers[index]) { |
| 178 | contents->TextDraw(rect.x, rect.y, Font::ColorDisabled, fmt::format("{:0" + std::to_string(line_no_max_digits) + "d}", line_numbers[index])); |
| 179 | } |
| 180 | contents->TextDraw(rect.x + line_no_max_digits * 6 + 6, rect.y, Font::ColorDefault, line); |
| 181 | } |
| 182 | } |