| 39 | } |
| 40 | |
| 41 | void Draw(RenderTarget& rt, const ScreenCoordsXY& coords) |
| 42 | { |
| 43 | TextPaint tempPaint = Paint; |
| 44 | |
| 45 | auto lineCoords = coords; |
| 46 | switch (Paint.alignment) |
| 47 | { |
| 48 | case TextAlignment::left: |
| 49 | break; |
| 50 | case TextAlignment::centre: |
| 51 | lineCoords.x += MaxWidth / 2; |
| 52 | break; |
| 53 | case TextAlignment::right: |
| 54 | lineCoords.x += MaxWidth; |
| 55 | break; |
| 56 | } |
| 57 | const utf8* buffer = Buffer.data(); |
| 58 | for (int32_t line = 0; line < LineCount; ++line) |
| 59 | { |
| 60 | drawText(rt, lineCoords, buffer, tempPaint); |
| 61 | tempPaint.colour = OpenRCT2::Drawing::kColourNull; |
| 62 | buffer = GetStringEnd(buffer) + 1; |
| 63 | lineCoords.y += LineHeight; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | int32_t GetHeight() const |
| 68 | { |
no test coverage detected