0x0046DFC3
| 63 | |
| 64 | // 0x0046DFC3 |
| 65 | void CurrencyObject::drawPreviewImage(Gfx::DrawingContext& drawingCtx, const int16_t x, const int16_t y) const |
| 66 | { |
| 67 | auto tr = Gfx::TextRenderer(drawingCtx); |
| 68 | |
| 69 | auto currencyIndex = objectIcon + 3; |
| 70 | |
| 71 | auto defaultElement = Gfx::getG1Element(ImageIds::currency_symbol); |
| 72 | auto backupElement = *defaultElement; |
| 73 | auto currencyElement = Gfx::getG1Element(currencyIndex); |
| 74 | |
| 75 | *defaultElement = *currencyElement; |
| 76 | |
| 77 | auto defaultWidth = Gfx::getCharacterWidth(Gfx::Font::large, U'£'); |
| 78 | Gfx::setCharacterWidth(Gfx::Font::large, U'£', currencyElement->width + 1); |
| 79 | |
| 80 | tr.drawStringCentred(Ui::Point(x, y - 9), Colour::black, StringIds::object_currency_big_font); |
| 81 | |
| 82 | Gfx::setCharacterWidth(Gfx::Font::large, U'£', defaultWidth); |
| 83 | *defaultElement = backupElement; |
| 84 | } |
| 85 | } |
nothing calls this directly
no test coverage detected