| 347 | |
| 348 | namespace { |
| 349 | void TextDrawUnderlined(BitmapRef contents, int x, int y, int color, std::string_view text) { |
| 350 | auto sys = Cache::SystemOrBlack(); |
| 351 | auto rect = Rect(x, y + 12, text.length() * 6, 1); |
| 352 | // Draw shadow first |
| 353 | contents->FillRect(Rect(rect.x + 1, rect.y + 1, rect.width, rect.height), sys->GetColorAt(18, 34)); |
| 354 | |
| 355 | //Draw the actual text |
| 356 | contents->TextDraw(x, y, color, text); |
| 357 | |
| 358 | // Draw underline |
| 359 | contents->FillRect(rect, sys->GetColorAt(color % 10 * 16 + 2, color / 10 * 16 + 48 + 15)); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | void Window_Interpreter::UiSubActionLine::Draw(BitmapRef contents, Rect rect) const { |
no test coverage detected